Commit 5166b0b 1 parent b73c6c3 commit 5166b0b Copy full SHA for 5166b0b
File tree 3 files changed +8
-6
lines changed
3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change 21
21
Optional
22
22
)
23
23
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
26
27
27
28
28
29
def authenticated (
@@ -45,7 +46,7 @@ def authenticated(
45
46
"""
46
47
@functools .wraps (method )
47
48
def wrapper ( # type: ignore
48
- self : RequestHandler , * args , ** kwargs
49
+ self : CylcAppHandler , * args , ** kwargs
49
50
) -> Optional [Awaitable [None ]]:
50
51
if not self .current_user :
51
52
self .log .debug ('Unauthenticated WebSocket request!' )
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ python_version = 3.7
3
3
ignore_missing_imports = True
4
4
files = cylc/uiserver
5
5
# 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)
7
7
8
8
# Enable PEP 420 style namespace packages, which we use.
9
9
# Needed for associating "import foo.bar" with foo/bar.py
Original file line number Diff line number Diff line change @@ -72,20 +72,21 @@ install_requires =
72
72
graphql-ws>=0.3.1,<0.4
73
73
jupyter_server>=1.10
74
74
tornado>=6.1.0 # matches jupyter_server value
75
- traitlets>5
75
+ traitlets>= 5
76
76
77
77
[options.extras_require]
78
78
hub =
79
79
jupyterhub ==1.4.*
80
80
tests =
81
81
coverage>=5.0.0
82
82
flake8>=3.0.0
83
- mypy>=0.812
83
+ mypy>=0.900
84
84
pytest-asyncio>=0.14.0
85
85
pytest-cov>=2.8.0
86
86
pytest-mock
87
87
pytest-tornasync>=0.5.0
88
88
pytest>=6
89
+ types-pkg_resources>=0.1.2
89
90
all =
90
91
%(hub)s
91
92
%(tests)s
You can’t perform that action at this time.
0 commit comments