Skip to content

Commit

Permalink
mypy: fix errors
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-sanders committed Nov 19, 2021
1 parent 12d702e commit 6e732bc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions cylc/flow/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,13 +228,13 @@ class Scheduler:
auto_restart_time: Optional[float] = None

# tcp / zmq
zmq_context: zmq.Context = None
zmq_context: Optional[zmq.Context] = None
port: Optional[int] = None
pub_port: Optional[int] = None
server: Optional[WorkflowRuntimeServer] = None
publisher: Optional[WorkflowPublisher] = None
barrier: Optional[Barrier] = None
curve_auth: ThreadAuthenticator = None
curve_auth: Optional[ThreadAuthenticator] = None
client_pub_key_dir: Optional[str] = None

# queue-released tasks still in prep
Expand Down Expand Up @@ -1718,7 +1718,8 @@ async def _shutdown(self, reason: Exception) -> None:
[(b'shutdown', str(reason).encode('utf-8'))]
)
self.publisher.stop()
self.curve_auth.stop() # stop the authentication thread
if self.curve_auth:
self.curve_auth.stop() # stop the authentication thread

# Flush errors and info before removing workflow contact file
sys.stdout.flush()
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ tests =
flake8-mutable>=1.2.0
flake8-simplify>=0.14.0
flake8>=3.0.0
mypy>=0.900
mypy>=0.910
# TODO: https://github.com/pytest-dev/pytest-asyncio/issues/ 209
pytest-asyncio>=0.15.1
pytest-cov>=2.8.0
Expand Down

0 comments on commit 6e732bc

Please sign in to comment.