Skip to content

Commit

Permalink
Enable no-implicit-optional and fix the one error that occurs (#2509)
Browse files Browse the repository at this point in the history
This comes from the benc-mypy branch.
See mypy issue python/mypy#9091 for
a bit more discussion about this option.
  • Loading branch information
benclifford authored Dec 26, 2022
1 parent 0cae4f7 commit 87d6eaf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
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

0 comments on commit 87d6eaf

Please sign in to comment.