fix: well-form NOSONAR suppressions (SonarCloud S7632/S7503)
The new decomposition modules used `# NOSONAR: reason` (colon form), which SonarCloud flags as a malformed suppression comment (python:S7632) and which fails to suppress the intended issue. Switch to the repo's bare `# NOSONAR` convention with the rationale in a comment above, matching config.py and auth/storage.py. This also lets the suppression silence python:S7503 (async method without await) on the protocol-required no-op aclose stubs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
2d845cb70f
commit
ccfe179a38
@@ -156,7 +156,10 @@ class NatsTaskProducer:
|
||||
) -> None:
|
||||
return None
|
||||
|
||||
async def aclose(self) -> None: # NOSONAR: async required by TaskProducer protocol
|
||||
# The bare ``# NOSONAR`` silences ``python:S7503`` (async method without
|
||||
# await): ``async def`` is required by the TaskProducer protocol, but this
|
||||
# handle close is a genuine no-op.
|
||||
async def aclose(self) -> None: # NOSONAR
|
||||
# Per-handle close (e.g. a per-user scanner clone exiting). The bus
|
||||
# connection is shared and owned by the lifespan, so this is a no-op;
|
||||
# the connection is torn down once via ``drain()`` on shutdown.
|
||||
|
||||
@@ -45,5 +45,8 @@ class PostgresTaskProducer:
|
||||
) -> None: # pragma: no cover
|
||||
return None
|
||||
|
||||
async def aclose(self) -> None: # pragma: no cover # NOSONAR: protocol stub
|
||||
# Bare ``# NOSONAR`` silences ``python:S7503`` (async method without await):
|
||||
# ``async def`` is required by the TaskProducer protocol; this stub is a
|
||||
# no-op until the Postgres transport lands.
|
||||
async def aclose(self) -> None: # NOSONAR # pragma: no cover
|
||||
return None
|
||||
|
||||
Reference in New Issue
Block a user