Skip to content
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
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ dev = [
"aws-sam-cli[pre-dev]",
"coverage==7.14.0",
"pytest-cov==7.1.0",
"mypy==1.19.1",
"mypy==2.1.0",
"types-pywin32==311.0.0.20260508",
"types-PyYAML==6.0.12.20250915",
"types-chevron==0.14.2.20250103",
Expand Down
2 changes: 1 addition & 1 deletion samcli/lib/sync/sync_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ def __hash__(self) -> int:
def __eq__(self, o: object) -> bool:
if type(o) is not type(self):
return False
return cast(bool, self._equality_keys() == cast(SyncFlow, o)._equality_keys())
return cast(bool, self._equality_keys() == o._equality_keys())

@property
def log_name(self) -> str:
Expand Down
2 changes: 1 addition & 1 deletion samcli/lib/telemetry/metric.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
No side effect will result in this as it is write-only for code outside of telemetry.
Decorators should be used to minimize logic involving telemetry.
"""
_METRICS = dict()
_METRICS: Dict[str, "Metric"] = dict()

# Global container socket and runtime information for telemetry
# This persists across context boundaries to ensure accurate telemetry reporting
Expand Down
2 changes: 1 addition & 1 deletion samcli/lib/utils/resource_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ def _get_definition_file(self) -> str:
definition_file = self._resource.get("Properties", {}).get(property_name)
if not definition_file or not isinstance(definition_file, str):
raise MissingLocalDefinition(self._resource_identifier, property_name)
return cast(str, definition_file)
return definition_file

def _validator_wrapper(self, event: Optional[FileSystemEvent] = None):
"""Wrapper for callback that only executes if the definition is valid and non-trivial changes are detected.
Expand Down
4 changes: 2 additions & 2 deletions samcli/local/apigw/authorizers/lambda_authorizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from abc import ABC, abstractmethod
from dataclasses import dataclass
from json import JSONDecodeError, loads
from typing import Any, Dict, List, Optional, Tuple, Type, Union, cast
from typing import Any, Dict, List, Optional, Tuple, Type, Union
from urllib.parse import parse_qsl

from samcli.commands.local.lib.validators.identity_source_validator import IdentitySourceValidator
Expand Down Expand Up @@ -417,7 +417,7 @@ def _validate_simple_response(self, response: dict) -> bool:
f"Authorizer {self.authorizer_name} is missing or contains an invalid " f"{_SIMPLE_RESPONSE_IS_AUTH}"
)

return cast(bool, is_authorized)
return is_authorized

def get_context(self, response: Union[str, bytes]) -> Dict[str, Any]:
"""
Expand Down
Loading