Skip to content

Commit 108c0d1

Browse files
committed
fix lint checks
1 parent 15e5189 commit 108c0d1

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ test:
1212

1313
lint:
1414
$(PYTHON) -m pylint trio_websocket/ tests/ autobahn/ examples/
15-
$(PYTHON) -m mypy trio_websocket tests autobahn examples
15+
$(PYTHON) -m mypy --explicit-package-bases trio_websocket tests autobahn examples
1616

1717
publish:
1818
rm -fr build dist .egg trio_websocket.egg-info

tests/test_connection.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
from __future__ import annotations
3333

3434
from functools import partial, wraps
35+
import re
3536
import ssl
3637
import sys
3738
from unittest.mock import patch
@@ -68,7 +69,7 @@
6869
)
6970

7071
if sys.version_info < (3, 11):
71-
from exceptiongroup import BaseExceptionGroup
72+
from exceptiongroup import BaseExceptionGroup # pylint: disable=redefined-builtin
7273

7374
WS_PROTO_VERSION = tuple(map(int, wsproto.__version__.split('.')))
7475

@@ -431,8 +432,7 @@ async def handler(request):
431432
assert header_value == b'My test header'
432433

433434
def _trio_default_loose() -> bool:
434-
import re
435-
assert re.match('^0\.\d\d\.', trio.__version__), "unexpected trio versioning scheme"
435+
assert re.match(r'^0\.\d\d\.', trio.__version__), "unexpected trio versioning scheme"
436436
return int(trio.__version__[2:4]) < 25
437437

438438
@fail_after(1)
@@ -459,7 +459,7 @@ async def handler(request):
459459
# 2. WebSocketServer.run
460460
# 3. trio.serve_listeners
461461
# 4. WebSocketServer._handle_connection
462-
from trio.testing import RaisesGroup
462+
from trio.testing import RaisesGroup # pylint: disable=import-outside-toplevel
463463
assert RaisesGroup(
464464
RaisesGroup(
465465
RaisesGroup(

0 commit comments

Comments
 (0)