fix(gateway): satisfy mypy on nats/grpc adapters and generated proto code

- nats_consumer/grpc_server: annotate nc/sub/server attrs (were inferred
  as None-only from __init__, breaking on the real assignment later).
- active_read: narrow on 'if names:' instead of the derived 'persisted'
  bool so mypy sees names as non-Optional inside the publish_reading call.
- pyproject: exclude ingestor/proto/ (protoc/grpcio-tools output) from
  mypy's file walk and skip following it as an import - it's generated,
  not hand-maintained, and mypy can't see its runtime-built message classes.
This commit is contained in:
PedroHMCosme
2026-09-22 11:42:24 -03:00
parent a215523fef
commit 4f4037b4ae
4 changed files with 17 additions and 4 deletions

View File

@@ -75,7 +75,7 @@ class ActiveReadEngine(SientiaMonitoring):
await self._record_read_lag(source_ts, tags)
source_str = self._format_ts(source_ts)
persisted = bool(names)
if persisted:
if names:
await self.sink.publish_reading(
tag=addr, value=value, timestamp=source_str, names=names
)