fix: stop S7632 flagging NOSONAR mentioned in prose comments
SonarCloud's python:S7632 parses the literal ``# NOSONAR`` token wherever it appears — including inside explanatory comments that *quote* the directive — and treats the following text as a malformed suppression. The actual bare ``# NOSONAR`` suppression lines are fine; the flagged lines were the prose comments describing them. Reword those comments to drop the inner ``#`` so the analyzer no longer sees a directive. 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
1528a1248d
commit
874c7c109b
@@ -122,8 +122,8 @@ class GatewayProvider(OpenAIProvider):
|
|||||||
# AsyncOpenAI rejects an empty key; use a non-secret placeholder when
|
# AsyncOpenAI rejects an empty key; use a non-secret placeholder when
|
||||||
# the gateway is unauthenticated. When a token provider is configured,
|
# the gateway is unauthenticated. When a token provider is configured,
|
||||||
# the real Bearer is set on the client before each request. The bare
|
# the real Bearer is set on the client before each request. The bare
|
||||||
# ``# NOSONAR`` silences the hard-coded-credential hotspot — this is a
|
# suppression marker below silences the hard-coded-credential hotspot —
|
||||||
# public placeholder string, not a secret.
|
# this is a public placeholder string, not a secret.
|
||||||
super().__init__(
|
super().__init__(
|
||||||
api_key=_UNAUTHENTICATED_PLACEHOLDER, # NOSONAR
|
api_key=_UNAUTHENTICATED_PLACEHOLDER, # NOSONAR
|
||||||
base_url=base_url,
|
base_url=base_url,
|
||||||
|
|||||||
@@ -156,9 +156,9 @@ class NatsTaskProducer:
|
|||||||
) -> None:
|
) -> None:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
# The bare ``# NOSONAR`` silences ``python:S7503`` (async method without
|
# The bare suppression marker silences S7503 (async method without await):
|
||||||
# await): ``async def`` is required by the TaskProducer protocol, but this
|
# ``async def`` is required by the TaskProducer protocol, but this handle
|
||||||
# handle close is a genuine no-op.
|
# close is a genuine no-op.
|
||||||
async def aclose(self) -> None: # NOSONAR
|
async def aclose(self) -> None: # NOSONAR
|
||||||
# Per-handle close (e.g. a per-user scanner clone exiting). The bus
|
# 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;
|
# connection is shared and owned by the lifespan, so this is a no-op;
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ class PostgresTaskProducer:
|
|||||||
) -> None: # pragma: no cover
|
) -> None: # pragma: no cover
|
||||||
return None
|
return None
|
||||||
|
|
||||||
# Bare ``# NOSONAR`` silences ``python:S7503`` (async method without await):
|
# The bare suppression marker silences S7503 (async method without await):
|
||||||
# ``async def`` is required by the TaskProducer protocol; this stub is a
|
# ``async def`` is required by the TaskProducer protocol; this stub is a
|
||||||
# no-op until the Postgres transport lands.
|
# no-op until the Postgres transport lands.
|
||||||
async def aclose(self) -> None: # NOSONAR # pragma: no cover
|
async def aclose(self) -> None: # NOSONAR # pragma: no cover
|
||||||
|
|||||||
Reference in New Issue
Block a user