From 676a85ef80e1c7d2537a9a2bcc5d1c34280ec38a Mon Sep 17 00:00:00 2001 From: barrust Date: Thu, 26 Dec 2024 21:13:12 -0500 Subject: [PATCH] fix more ruff issues --- .github/workflows/python-package.yml | 2 +- probables/__init__.py | 6 ++---- probables/blooms/expandingbloom.py | 5 +---- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 5b38d19..7236225 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13'] + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] steps: - uses: actions/checkout@v4 diff --git a/probables/__init__.py b/probables/__init__.py index 0ca59c2..532cb8e 100644 --- a/probables/__init__.py +++ b/probables/__init__.py @@ -1,6 +1,4 @@ -""" pyprobables module """ - -from typing import List +"""pyprobables module""" from probables.blooms import ( BloomFilter, @@ -26,7 +24,7 @@ __email__ = "barrust@gmail.com" __license__ = "MIT" __version__ = "0.6.1" -__credits__: List[str] = [] +__credits__: list[str] = [] __url__ = "https://github.com/barrust/pyprobables" __bugtrack_url__ = "https://github.com/barrust/pyprobables/issues" diff --git a/probables/blooms/expandingbloom.py b/probables/blooms/expandingbloom.py index 1cf2314..a1cf268 100644 --- a/probables/blooms/expandingbloom.py +++ b/probables/blooms/expandingbloom.py @@ -146,10 +146,7 @@ def check_alt(self, hashes: HashResultsT) -> bool: Returns: bool: `True` if the element is likely present; `False` if definately not present""" # return any(.check_alt(hashes)) - for blm in self._blooms: - if blm.check_alt(hashes): - return True - return False + return any(blm.check_alt(hashes) for blm in self._blooms) def add(self, key: KeyT, force: bool = False) -> None: """Add the key to the Bloom Filter