diff --git a/pccommon/pccommon/config/__init__.py b/pccommon/pccommon/config/__init__.py index ed35b4cf..487c48e2 100644 --- a/pccommon/pccommon/config/__init__.py +++ b/pccommon/pccommon/config/__init__.py @@ -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 } diff --git a/pccommon/pccommon/logging.py b/pccommon/pccommon/logging.py index 77e7d2df..1b7e6e2b 100644 --- a/pccommon/pccommon/logging.py +++ b/pccommon/pccommon/logging.py @@ -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) diff --git a/pccommon/pccommon/tables.py b/pccommon/pccommon/tables.py index 20993306..af60b7b1 100644 --- a/pccommon/pccommon/tables.py +++ b/pccommon/pccommon/tables.py @@ -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 ) diff --git a/pccommon/setup.py b/pccommon/setup.py index 4a7db2e6..d330ecba 100644 --- a/pccommon/setup.py +++ b/pccommon/setup.py @@ -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(