Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1580 from mathbunnyru/asalikhov/fix_typing
Fix all typing issues
- Loading branch information
Showing
25 changed files
with
184 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[mypy] | ||
python_version = 3.9 | ||
follow_imports = normal | ||
strict = False | ||
no_incremental = True | ||
|
||
[mypy-docker.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-matplotlib.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-packaging.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-pandas.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-plumbum.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-pyspark.*] | ||
ignore_missing_imports = True | ||
|
||
[mypy-tensorflow.*] | ||
ignore_missing_imports = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,22 @@ | ||
# Copyright (c) Jupyter Development Team. | ||
# Distributed under the terms of the Modified BSD License. | ||
from typing import Optional | ||
from .images_hierarchy import ALL_IMAGES | ||
from .manifests import ManifestInterface | ||
from .taggers import TaggerInterface | ||
|
||
|
||
def get_taggers_and_manifests( | ||
short_image_name: str, | ||
short_image_name: Optional[str], | ||
) -> tuple[list[TaggerInterface], list[ManifestInterface]]: | ||
taggers: list[TaggerInterface] = [] | ||
manifests: list[ManifestInterface] = [] | ||
while short_image_name is not None: | ||
image_description = ALL_IMAGES[short_image_name] | ||
if short_image_name is None: | ||
return [[], []] # type: ignore | ||
|
||
taggers = image_description.taggers + taggers | ||
manifests = image_description.manifests + manifests | ||
|
||
short_image_name = image_description.parent_image | ||
return taggers, manifests | ||
image_description = ALL_IMAGES[short_image_name] | ||
parent_taggers, parent_manifests = get_taggers_and_manifests( | ||
image_description.parent_image | ||
) | ||
return ( | ||
parent_taggers + image_description.taggers, | ||
parent_manifests + image_description.manifests, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.