Skip to content

Commit 980cd37

Browse files
dduttclaudious96
authored andcommitted
pylint fixes
Signed-off-by: Dinesh Dutt <[email protected]>
1 parent 84f56b1 commit 980cd37

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

suzieq/db/parquet/parquetdb.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,7 @@ def read(self, table_name: str, data_format: str,
130130
continue
131131
if need_sqvers:
132132
vers = float(str(elem).split('=')[-1])
133-
if vers > max_vers:
134-
max_vers = vers
133+
max_vers = max(vers, max_vers)
135134

136135
dataset = ds.dataset(elem, format='parquet',
137136
partitioning='hive')
@@ -539,8 +538,7 @@ def _get_cp_dataset(self, table_name: str, need_sqvers: bool,
539538
continue
540539
if need_sqvers:
541540
vers = float(str(elem).split('=')[-1])
542-
if vers > max_vers:
543-
max_vers = vers
541+
max_vers = max(vers, max_vers)
544542

545543
dataset = ds.dataset(elem, format='parquet', partitioning='hive')
546544

@@ -631,7 +629,6 @@ def check_ns_conds(ns_to_test: str, filter_list: List[str],
631629
Returns:
632630
bool: the result of the expression
633631
"""
634-
# pylint: disable=comparison-with-callable
635632
# We would like to init the result to False if we concat the
636633
# expressions with OR, while with True if we use AND.
637634
res = False

suzieq/engines/pandas/routes.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ def _cons_addnl_fields(self, columns: List[str], addnl_fields: List[str],
3535

3636
return addnl_fields
3737

38-
# pylint: disable=too-many-statements
3938
def get(self, **kwargs):
4039
'''Return the routes table for the given filters'''
4140

suzieq/gui/stlit/xplore.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -389,8 +389,7 @@ def _draw_aggrid_df(self, df) -> AgGrid:
389389

390390
start_row = self._state.start_row
391391
end_row = self._state.end_row
392-
if end_row > df.shape[0]:
393-
end_row = df.shape[0]
392+
end_row = min(end_row, df.shape[0])
394393

395394
if end_row - start_row > MAX_ROW_WARN:
396395
st.warning('Printing too many rows can fail or be very slow')

0 commit comments

Comments
 (0)