Skip to content

Commit 5166b0b

Browse files
mypy: upgrade to 0.900
1 parent b73c6c3 commit 5166b0b

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

cylc/uiserver/websockets/__init__.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@
2121
Optional
2222
)
2323
import functools
24-
from tornado.web import RequestHandler, HTTPError
25-
import logging
24+
from tornado.web import HTTPError
25+
26+
from cylc.uiserver.handlers import CylcAppHandler
2627

2728

2829
def authenticated(
@@ -45,7 +46,7 @@ def authenticated(
4546
"""
4647
@functools.wraps(method)
4748
def wrapper( # type: ignore
48-
self: RequestHandler, *args, **kwargs
49+
self: CylcAppHandler, *args, **kwargs
4950
) -> Optional[Awaitable[None]]:
5051
if not self.current_user:
5152
self.log.debug('Unauthenticated WebSocket request!')

mypy.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ python_version = 3.7
33
ignore_missing_imports = True
44
files = cylc/uiserver
55
# don't run mypy on these files directly
6-
exclude = cylc/uiserver/(websockets/tornado.py|config_defaults.py)
6+
exclude = cylc/uiserver/(websockets/tornado.py|jupyter_config.py)
77

88
# Enable PEP 420 style namespace packages, which we use.
99
# Needed for associating "import foo.bar" with foo/bar.py

setup.cfg

+3-2
Original file line numberDiff line numberDiff line change
@@ -72,20 +72,21 @@ install_requires =
7272
graphql-ws>=0.3.1,<0.4
7373
jupyter_server>=1.10
7474
tornado>=6.1.0 # matches jupyter_server value
75-
traitlets>5
75+
traitlets>=5
7676

7777
[options.extras_require]
7878
hub =
7979
jupyterhub==1.4.*
8080
tests =
8181
coverage>=5.0.0
8282
flake8>=3.0.0
83-
mypy>=0.812
83+
mypy>=0.900
8484
pytest-asyncio>=0.14.0
8585
pytest-cov>=2.8.0
8686
pytest-mock
8787
pytest-tornasync>=0.5.0
8888
pytest>=6
89+
types-pkg_resources>=0.1.2
8990
all =
9091
%(hub)s
9192
%(tests)s

0 commit comments

Comments
 (0)