Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
- name: Style checks
run: |
python -m ruff check .
python -m ruff format --check .
- name: Test suite run (pure Python)
run: |
python -m unittest fastbencode.tests.test_suite
Expand Down
4 changes: 1 addition & 3 deletions fastbencode/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@
except ModuleNotFoundError as e:
import warnings

warnings.warn(
f"failed to load compiled extension: {e}", UserWarning
)
warnings.warn(f"failed to load compiled extension: {e}", UserWarning)

# Fall back to pure Python implementation
from ._bencode_py import ( # noqa: F401
Expand Down
8 changes: 5 additions & 3 deletions fastbencode/tests/test_bencode.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,11 @@ def test_list(self):
def test_list_deepnested(self):
import platform

if platform.python_implementation() == "PyPy" or sys.version_info[
:2
] >= (3, 12) or self.id().endswith("(C)"):
if (
platform.python_implementation() == "PyPy"
or sys.version_info[:2] >= (3, 12)
or self.id().endswith("(C)")
):
expected = []
for i in range(99):
expected = [expected]
Expand Down