Skip to content

Commit

Permalink
Merge pull request #286 from PowerGridModel/fix-sonar
Browse files Browse the repository at this point in the history
Fix sonar
  • Loading branch information
figueroa1395 authored Jan 8, 2025
2 parents 8e420fd + faa51a6 commit 906969e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-test-and-sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
- name: SonarCloud Scan
if: ${{ (github.event_name == 'push') || (github.event.pull_request.head.repo.owner.login == 'PowerGridModel') }}
uses: SonarSource/sonarcloud-github-action@master
uses: SonarSource/sonarqube-scan-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand Down
3 changes: 2 additions & 1 deletion src/power_grid_model_io/functions/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ def exclude_value(row: pd.Series, col: str, value: Union[float, str]) -> bool:
if col not in row:
raise ValueError(f"The column: '{col}' cannot be found for the filter")
result = row[col] != value
if isinstance(result, pd.Series):
# Sonar cloud false positive (S2583): result can be a pd.Series of bool
if isinstance(result, pd.Series): # NOSONAR
return result.item()
return result

Expand Down

0 comments on commit 906969e

Please sign in to comment.