Skip to content

Commit

Permalink
fix processor tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ekneg54 committed Feb 2, 2025
1 parent 41bc3c5 commit 805fe77
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions logprep/util/getter.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,7 @@ class FileGetter(Getter):
def get_raw(self) -> bytes:
"""Opens file and returns its binary content."""
path = Path(self.target)
if path.exists():
return path.read_bytes()
raise FileNotFoundError(f"File '{path}' not found.")
return path.read_bytes()


@define(kw_only=True)
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/component/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

class BaseComponentTestCase(ABC):
CONFIG: dict = {}
object: Component = None
object: Component | None = None
logger = getLogger()
expected_metrics: list = []

Expand Down
4 changes: 2 additions & 2 deletions tests/unit/processor/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ class BaseProcessorTestCase(BaseComponentTestCase):

logger = getLogger()

object: Processor = None
object: Processor | None = None

patchers: list = None
patchers: list | None = None

rules: list

Expand Down

0 comments on commit 805fe77

Please sign in to comment.