Skip to content

Commit

Permalink
pyright fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
wolph committed Jun 21, 2024
1 parent 561f3c8 commit d7315a5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion portalocker_tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,6 @@ def test_shared_processes(tmpfile, fail_when_locked):
def test_exclusive_processes(tmpfile: str, fail_when_locked: bool, locker):
flags = LockFlags.EXCLUSIVE | LockFlags.NON_BLOCKING

pool: multiprocessing.Pool
print('Locking', tmpfile, fail_when_locked, locker)

Check failure on line 350 in portalocker_tests/tests.py

View workflow job for this annotation

GitHub Actions / lint (3.8)

Ruff (T201)

portalocker_tests/tests.py:350:5: T201 `print` found

Check failure on line 350 in portalocker_tests/tests.py

View workflow job for this annotation

GitHub Actions / lint (3.11)

Ruff (T201)

portalocker_tests/tests.py:350:5: T201 `print` found

Check failure on line 350 in portalocker_tests/tests.py

View workflow job for this annotation

GitHub Actions / lint (3.8)

Ruff (T201)

portalocker_tests/tests.py:350:5: T201 `print` found

Check failure on line 350 in portalocker_tests/tests.py

View workflow job for this annotation

GitHub Actions / lint (3.10)

Ruff (T201)

portalocker_tests/tests.py:350:5: T201 `print` found
with multiprocessing.Pool(processes=2) as pool:
# Submit tasks individually
Expand All @@ -373,7 +372,13 @@ def test_exclusive_processes(tmpfile: str, fail_when_locked: bool, locker):
print(f'{a=}')

Check failure on line 372 in portalocker_tests/tests.py

View workflow job for this annotation

GitHub Actions / lint (3.8)

Ruff (T201)

portalocker_tests/tests.py:372:9: T201 `print` found

Check failure on line 372 in portalocker_tests/tests.py

View workflow job for this annotation

GitHub Actions / lint (3.11)

Ruff (T201)

portalocker_tests/tests.py:372:9: T201 `print` found

Check failure on line 372 in portalocker_tests/tests.py

View workflow job for this annotation

GitHub Actions / lint (3.8)

Ruff (T201)

portalocker_tests/tests.py:372:9: T201 `print` found

Check failure on line 372 in portalocker_tests/tests.py

View workflow job for this annotation

GitHub Actions / lint (3.10)

Ruff (T201)

portalocker_tests/tests.py:372:9: T201 `print` found
print(f'{b=}')

Check failure on line 373 in portalocker_tests/tests.py

View workflow job for this annotation

GitHub Actions / lint (3.8)

Ruff (T201)

portalocker_tests/tests.py:373:9: T201 `print` found

Check failure on line 373 in portalocker_tests/tests.py

View workflow job for this annotation

GitHub Actions / lint (3.11)

Ruff (T201)

portalocker_tests/tests.py:373:9: T201 `print` found

Check failure on line 373 in portalocker_tests/tests.py

View workflow job for this annotation

GitHub Actions / lint (3.8)

Ruff (T201)

portalocker_tests/tests.py:373:9: T201 `print` found

Check failure on line 373 in portalocker_tests/tests.py

View workflow job for this annotation

GitHub Actions / lint (3.10)

Ruff (T201)

portalocker_tests/tests.py:373:9: T201 `print` found

# make pyright happy
assert a is not None

if b:
# make pyright happy
assert b is not None

assert not a.exception_class or not b.exception_class
assert issubclass(
a.exception_class or b.exception_class, # type: ignore
Expand Down

0 comments on commit d7315a5

Please sign in to comment.