Skip to content

Commit

Permalink
More mypy induced changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ghidalgo3 committed Feb 2, 2024
1 parent da3e028 commit 799089f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
1 change: 1 addition & 0 deletions pccommon/pccommon/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ def get_all_render_configs() -> Dict[str, DefaultRenderConfig]:
for id, coll in get_apis_config()
.get_collection_config_table()
.get_all_configs()
if id is not None
}
2 changes: 1 addition & 1 deletion pccommon/pccommon/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def filter(self, record: logging.LogRecord) -> bool:
# Prevent successful health check pings from being logged
class HealthCheckFilter(logging.Filter):
def filter(self, record: logging.LogRecord) -> bool:
if len(record.args) != 5:
if record.args is not None and len(record.args) != 5:
return True

args = cast(Tuple[str, str, str, str, int], record.args)
Expand Down
2 changes: 1 addition & 1 deletion pccommon/pccommon/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ def get_all(self) -> Iterable[Tuple[Optional[str], Optional[str], M]]:
yield (
partition_key,
row_key,
self._parse_model(entity, partition_key, row_key),
self._parse_model(entity, partition_key, row_key), # type: ignore
)


Expand Down
10 changes: 2 additions & 8 deletions pccommon/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,8 @@
]

extra_reqs = {
"test": [
"pytest",
"pytest-asyncio",
],
"dev": [
"pytest",
"pytest-asyncio",
],
"test": ["pytest", "pytest-asyncio", "types-redis"],
"dev": ["pytest", "pytest-asyncio", "types-redis"],
}

setup(
Expand Down

0 comments on commit 799089f

Please sign in to comment.