Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable no-implicit-optional and fix the one error that occurs #2509

Merged
merged 2 commits into from
Dec 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ plugins = sqlmypy
# codebase.
disable_error_code = str-bytes-safe

no_implicit_optional = True


[mypy-non_existent.*]
ignore_missing_imports = True

Expand Down
5 changes: 3 additions & 2 deletions parsl/executors/threads.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
import typeguard
import concurrent.futures as cf

from typing import Any, List, Optional
from typing import List, Optional

from parsl.data_provider.staging import Staging
from parsl.executors.status_handling import NoStatusHandlingExecutor
from parsl.utils import RepresentationMixin
from parsl.executors.errors import UnsupportedFeatureError
Expand All @@ -30,7 +31,7 @@ class ThreadPoolExecutor(NoStatusHandlingExecutor, RepresentationMixin):

@typeguard.typechecked
def __init__(self, label: str = 'threads', max_threads: int = 2,
thread_name_prefix: str = '', storage_access: List[Any] = None,
thread_name_prefix: str = '', storage_access: Optional[List[Staging]] = None,
working_dir: Optional[str] = None, managed: bool = True):
NoStatusHandlingExecutor.__init__(self)
self.label = label
Expand Down