SIENTIAPDE-1974: chore(slots): drop NOSONAR, accept S7504 in SonarQube instead
Review (Vitor): avoid NOSONAR; when a SonarQube issue does not apply, accept it in SonarQube so the decision is recorded there. The list() snapshot of the readers stays (the loop awaits) and the comment says why S7504 is accepted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -561,8 +561,9 @@ class IngestorManager(SientiaMonitoring):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
# list() snapshots the readers: the loop awaits, so a reader added or removed
|
# list() snapshots the readers: the loop awaits, so a reader added or removed
|
||||||
# meanwhile must not break the iteration.
|
# meanwhile must not break the iteration. SonarQube flags it as an unnecessary
|
||||||
for server, reader in list(self.opc_managers.items()): # NOSONAR
|
# list() (S7504); the issue is accepted in SonarQube for this reason.
|
||||||
|
for server, reader in list(self.opc_managers.items()):
|
||||||
if slot in reader.subscriptions:
|
if slot in reader.subscriptions:
|
||||||
await self._unsubscribe_reader(server, reader, slot)
|
await self._unsubscribe_reader(server, reader, slot)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user