Skip to content

Commit

Permalink
chore(deps-dev): bump mypy from 1.5.1 to 1.6.1 in /requirements (#6152)
Browse files Browse the repository at this point in the history
* chore(deps-dev): bump mypy from 1.5.1 to 1.6.1 in /requirements

Bumps [mypy](https://github.com/python/mypy) from 1.5.1 to 1.6.1.
- [Changelog](https://github.com/python/mypy/blob/master/CHANGELOG.md)
- [Commits](python/mypy@v1.5.1...v1.6.1)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

* fix issues with mypy version bump

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mehmet Nuri Deveci <[email protected]>
  • Loading branch information
dependabot[bot] and mndeveci authored Oct 31, 2023
1 parent 9eb517a commit 86bfdc2
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pytest-cov==4.1.0
# type checking and related stubs
# mypy adds new rules in new minor versions, which could cause our PR check to fail
# here we fix its version and upgrade it manually in the future
mypy==1.5.1
mypy==1.6.1
types-pywin32==306.0.0.4
types-PyYAML==6.0.12.11
types-chevron==0.14.2.5
Expand Down
4 changes: 2 additions & 2 deletions samcli/lib/docs/documentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import json
import logging
from pathlib import Path
from typing import Any, Dict
from typing import Dict

from samcli.lib.docs.browser_configuration import BrowserConfiguration

Expand Down Expand Up @@ -58,7 +58,7 @@ def get_docs_link_for_command(self) -> str:
return Documentation.load().get(self.command, LANDING_PAGE)

@staticmethod
def load() -> Dict[str, Any]:
def load() -> Dict[str, str]:
"""
Opens the configuration file and returns the contents
Expand Down
10 changes: 5 additions & 5 deletions samcli/lib/providers/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ def __init__(
location: str,
parameters: Optional[Dict],
template_dict: Dict,
metadata: Optional[Dict] = None,
metadata: Optional[Dict[str, str]] = None,
):
self.parent_stack_path = parent_stack_path
self.name = name
Expand All @@ -596,8 +596,8 @@ def __init__(

@property
def stack_id(self) -> str:
_metadata = self.metadata if self.metadata else {}
return _metadata.get(SAM_RESOURCE_ID_KEY, self.name) if self.metadata else self.name
_metadata: Dict[str, str] = self.metadata or {}
return _metadata.get(SAM_RESOURCE_ID_KEY, self.name)

@property
def stack_path(self) -> str:
Expand Down Expand Up @@ -626,7 +626,7 @@ def resources(self) -> Dict:
if self._resources is not None:
return self._resources
processed_template_dict: Dict[str, Dict] = SamBaseProvider.get_template(self.template_dict, self.parameters)
self._resources = cast(Dict, processed_template_dict.get("Resources", {}))
self._resources = processed_template_dict.get("Resources", {})
return self._resources

@property
Expand Down Expand Up @@ -937,7 +937,7 @@ def get_unique_resource_ids(
return output_resource_ids


def get_skip_build(metadata: Optional[Dict]) -> bool:
def get_skip_build(metadata: Optional[Dict[str, bool]]) -> bool:
"""
Returns the value of SkipBuild property from Metadata, False if it is not defined
"""
Expand Down
4 changes: 2 additions & 2 deletions samcli/lib/providers/sam_base_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def _extract_lambda_function_imageuri(resource_properties: Dict, code_property_k
return cast(Optional[str], resource_properties.get(code_property_key, dict()).get("ImageUri", None))

@staticmethod
def _extract_sam_function_imageuri(resource_properties: Dict, code_property_key: str) -> Optional[str]:
def _extract_sam_function_imageuri(resource_properties: Dict[str, str], code_property_key: str) -> Optional[str]:
"""
Extracts the Serverless Function ImageUri from the Resource Properties
Expand All @@ -161,7 +161,7 @@ def _extract_sam_function_imageuri(resource_properties: Dict, code_property_key:
str
Representing the local imageuri
"""
return resource_properties.get(code_property_key, None)
return resource_properties.get(code_property_key)

@staticmethod
def get_template(
Expand Down

0 comments on commit 86bfdc2

Please sign in to comment.