Skip to content

Commit 24a77de

Browse files
committed
Update to mypy 0.780.
1 parent 69c94af commit 24a77de

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/websockets/__main__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ def exit_from_event_loop_thread(
4949
if not stop.done():
5050
# When exiting the thread that runs the event loop, raise
5151
# KeyboardInterrupt in the main thread to exit the program.
52-
try:
53-
ctrl_c = signal.CTRL_C_EVENT # Windows
54-
except AttributeError:
55-
ctrl_c = signal.SIGINT # POSIX
52+
if sys.platform == "win32":
53+
ctrl_c = signal.CTRL_C_EVENT
54+
else:
55+
ctrl_c = signal.SIGINT
5656
os.kill(os.getpid(), ctrl_c)
5757

5858

src/websockets/typing.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"""
1515
# Remove try / except when dropping support for Python < 3.7
1616
try:
17-
Data.__doc__ = Data__doc__ # type: ignore
17+
Data.__doc__ = Data__doc__
1818
except AttributeError: # pragma: no cover
1919
pass
2020

@@ -31,7 +31,7 @@
3131

3232
ExtensionParameter__doc__ = """Parameter of a WebSocket extension"""
3333
try:
34-
ExtensionParameter.__doc__ = ExtensionParameter__doc__ # type: ignore
34+
ExtensionParameter.__doc__ = ExtensionParameter__doc__
3535
except AttributeError: # pragma: no cover
3636
pass
3737

@@ -40,7 +40,7 @@
4040

4141
ExtensionHeader__doc__ = """Item parsed in a Sec-WebSocket-Extensions header"""
4242
try:
43-
ExtensionHeader.__doc__ = ExtensionHeader__doc__ # type: ignore
43+
ExtensionHeader.__doc__ = ExtensionHeader__doc__
4444
except AttributeError: # pragma: no cover
4545
pass
4646

0 commit comments

Comments
 (0)