diff options
| author | John L. Villalovos <john@sodarock.com> | 2022-07-31 23:49:56 -0700 |
|---|---|---|
| committer | John L. Villalovos <john@sodarock.com> | 2022-07-31 23:49:56 -0700 |
| commit | 64b208e0e91540af2b645da595f0ef79ee7522e1 (patch) | |
| tree | 7262cc0a98618dfd9633aa52151f68f4d592a4c3 | |
| parent | 54dd4c3f857f82aa8781b0daf22fa2dd3c60c2c4 (diff) | |
| download | gitlab-64b208e0e91540af2b645da595f0ef79ee7522e1.tar.gz | |
chore: enable mypy check `no_implicit_optional`
| -rw-r--r-- | gitlab/v4/objects/appearance.py | 2 | ||||
| -rw-r--r-- | gitlab/v4/objects/repositories.py | 2 | ||||
| -rw-r--r-- | gitlab/v4/objects/settings.py | 2 | ||||
| -rw-r--r-- | pyproject.toml | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/gitlab/v4/objects/appearance.py b/gitlab/v4/objects/appearance.py index 88ab621..f811d20 100644 --- a/gitlab/v4/objects/appearance.py +++ b/gitlab/v4/objects/appearance.py @@ -38,7 +38,7 @@ class ApplicationAppearanceManager(GetWithoutIdMixin, UpdateMixin, RESTManager): def update( self, id: Optional[Union[str, int]] = None, - new_data: Dict[str, Any] = None, + new_data: Optional[Dict[str, Any]] = None, **kwargs: Any ) -> Dict[str, Any]: """Update an object on the server. diff --git a/gitlab/v4/objects/repositories.py b/gitlab/v4/objects/repositories.py index b8dbdd8..b340e80 100644 --- a/gitlab/v4/objects/repositories.py +++ b/gitlab/v4/objects/repositories.py @@ -196,7 +196,7 @@ class RepositoryMixin(_RestObjectBase): @exc.on_http_error(exc.GitlabListError) def repository_archive( self, - sha: str = None, + sha: Optional[str] = None, streamed: bool = False, action: Optional[Callable[..., Any]] = None, chunk_size: int = 1024, diff --git a/gitlab/v4/objects/settings.py b/gitlab/v4/objects/settings.py index 16b1041..cc6b1c0 100644 --- a/gitlab/v4/objects/settings.py +++ b/gitlab/v4/objects/settings.py @@ -93,7 +93,7 @@ class ApplicationSettingsManager(GetWithoutIdMixin, UpdateMixin, RESTManager): def update( self, id: Optional[Union[str, int]] = None, - new_data: Dict[str, Any] = None, + new_data: Optional[Dict[str, Any]] = None, **kwargs: Any ) -> Dict[str, Any]: """Update an object on the server. diff --git a/pyproject.toml b/pyproject.toml index 544543b..a8b0220 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,6 +13,7 @@ disallow_incomplete_defs = true disallow_subclassing_any = true disallow_untyped_decorators = true disallow_untyped_defs = true +no_implicit_optional = true no_implicit_reexport = true strict_equality = true warn_redundant_casts = true @@ -23,7 +24,6 @@ warn_unused_ignores = true # The following need to have changes made to be able to enable them: # disallow_any_generics = true # disallow_untyped_calls = true -# no_implicit_optional = true [[tool.mypy.overrides]] # Overrides for currently untyped modules module = [ |
