Skip to content

Commit 906969e

Browse files
authored
Merge pull request #286 from PowerGridModel/fix-sonar
Fix sonar
2 parents 8e420fd + faa51a6 commit 906969e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/build-test-and-sonar.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ jobs:
9696
9797
- name: SonarCloud Scan
9898
if: ${{ (github.event_name == 'push') || (github.event.pull_request.head.repo.owner.login == 'PowerGridModel') }}
99-
uses: SonarSource/sonarcloud-github-action@master
99+
uses: SonarSource/sonarqube-scan-action@master
100100
env:
101101
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
102102
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

src/power_grid_model_io/functions/filters.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ def exclude_value(row: pd.Series, col: str, value: Union[float, str]) -> bool:
3131
if col not in row:
3232
raise ValueError(f"The column: '{col}' cannot be found for the filter")
3333
result = row[col] != value
34-
if isinstance(result, pd.Series):
34+
# Sonar cloud false positive (S2583): result can be a pd.Series of bool
35+
if isinstance(result, pd.Series): # NOSONAR
3536
return result.item()
3637
return result
3738

0 commit comments

Comments
 (0)