Skip to content

Commit

Permalink
parquetdb: fix linting
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Usai <claudio.usai@stardustsystems.net>
  • Loading branch information
claudious96 committed May 25, 2024
1 parent 9b51688 commit 5b41426
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions suzieq/db/parquet/parquetdb.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import re
from time import time
from typing import List, Optional
from typing import Any, Callable, List, Optional
import logging
from pathlib import Path
from datetime import datetime, timedelta, timezone
Expand Down Expand Up @@ -619,7 +619,7 @@ def _get_filtered_fileset(self, dataset: ds, namespaces: list) -> ds:
ds: pyarrow dataset of only the files that match filter
"""
def check_ns_conds(ns_to_test: str, filter_list: List[str],
op: operator.or_) -> bool:
op: Callable[[Any, Any], Any]) -> bool:
"""Concat the expressions with the provided (AND or OR) operator
and return the result of the resulting expression tested on the
provided namespace.
Expand All @@ -635,7 +635,7 @@ def check_ns_conds(ns_to_test: str, filter_list: List[str],
# We would like to init the result to False if we concat the
# expressions with OR, while with True if we use AND.
res = False
if operator.and_ == op:
if operator.and_ is op:
res = True
for filter_val in filter_list:
ns_to_test = ns_to_test.split('namespace=')[-1]
Expand Down

0 comments on commit 5b41426

Please sign in to comment.