Skip to content

Apply Ruff as the code formatter and linter#854

Merged
WenjieDu merged 4 commits into
devfrom
(lint)use_ruff
May 4, 2026
Merged

Apply Ruff as the code formatter and linter#854
WenjieDu merged 4 commits into
devfrom
(lint)use_ruff

refact: run ruff check --fix .;

684b5a9
Select commit
Loading
Failed to load commit list.
SonarQubeCloud / SonarCloud Code Analysis succeeded May 4, 2026 in 1m 2s

Annotations

Check warning on line 34 in tests/utils/random.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Use the opposite operator ("!=") instead.

See more on https://sonarcloud.io/project/issues?id=WenjieDu_PyPOTS&issues=AZ3z2DQvaLIAKC8c0xLZ&open=AZ3z2DQvaLIAKC8c0xLZ&pullRequest=854

Check failure on line 83 in tests/forecasting/dlinear.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Define a constant instead of duplicating this literal "Output has missing values in the forecasting results that should not be." 3 times.

See more on https://sonarcloud.io/project/issues?id=WenjieDu_PyPOTS&issues=AZ3z2DOmaLIAKC8c0xLY&open=AZ3z2DOmaLIAKC8c0xLY&pullRequest=854

Check failure on line 67 in pypots/cli/dev.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 17 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=WenjieDu_PyPOTS&issues=AZ3z2DC0aLIAKC8c0xLX&open=AZ3z2DC0aLIAKC8c0xLX&pullRequest=854

Check failure on line 72 in pypots/cli/recommend.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 29 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=WenjieDu_PyPOTS&issues=AZ3z2DCHaLIAKC8c0xLW&open=AZ3z2DCHaLIAKC8c0xLW&pullRequest=854

Check failure on line 211 in pypots/cli/data.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 19 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=WenjieDu_PyPOTS&issues=AZ3z2C_WaLIAKC8c0xLU&open=AZ3z2C_WaLIAKC8c0xLU&pullRequest=854

Check failure on line 319 in pypots/cli/data.py

See this annotation in the file changed.

@sonarqubecloud sonarqubecloud / SonarCloud Code Analysis

Refactor this function to reduce its Cognitive Complexity from 40 to the 15 allowed.

See more on https://sonarcloud.io/project/issues?id=WenjieDu_PyPOTS&issues=AZ3z2C_WaLIAKC8c0xLV&open=AZ3z2C_WaLIAKC8c0xLV&pullRequest=854