aleph-im / aleph-sdk-python

Python SDK library for the Aleph.im network
MIT License
2 stars 4 forks source link

Fix: Ruff did not check code quality #126

Closed hoh closed 1 month ago

hoh commented 1 month ago

Solution: Add ruff to check the code quality and fix the reported errors.

github-actions[bot] commented 1 month ago

The PR does not contain any substantial changes or additions. It appears to be a simple update to the pyproject.toml file, specifically the version of ruff, black and isort which might be a tooling update. The diff is not too large, so it should not introduce any significant complexity.

Here's a summary of the changes:

diff  --git a/pyproject.toml b/pyproject.toml
index f21f7ece..63fa6d35 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -141,19 +141,19 @@ dependencies = [
      "black==24.2.0",
      "mypy==1.9.0",
      "mypy-extensions==1.0.0",
-     "ruff==0.1.15",
+     "ruff==0.4.8",
      "isort==5.13.2",

 [tool.hatch.envs.linting.scripts]
 typing = "mypy  --config-file=pyproject.toml  {args:}  ./src/  ./tests/  ./examples/"
 style = ["ruff  {args:.}  ./src/  ./tests/  ./examples/",

The PR does not seem to contain any new files or directories, so it should not introduce any new complexity.

BLACK

The PR contains changes to the codebase that require a deep understanding of the project architecture. The diff contains changes to the pyproject.toml file and the tests/unit directory, which could potentially introduce bugs. Only the most experienced developers should review this PR, and the label should be used sparingly, if possible.

Here's a summary of the changes:

diff  --git a/pyproject.toml b/pyproject.toml
index f21f7ece..63fa6d35 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -169,6 +169,7 @@ exclude = [
      "conftest.py"

 show_column_numbers = true
+check_untyped_defs = true

diff  --git a/tests/unit b/tests/unit
new file mode 160000
index 00000000..eadfcec1
--- /dev/null
+++ b/tests/unit

The PR contains new files and directories, which could potentially introduce new complexity. Only the most experienced developers should review this PR, and the label should be used sparingly, if possible.

RED

The PR contains changes to the codebase that are likely to introduce moderate risks. The diff contains changes to the tests/unit/conftest.py file, which could potentially introduce bugs. This PR should be reviewed by experienced developers.

Here's a summary of the changes:

diff  --git a/tests/unit/conftest.py b/tests/unit/conftest.py
index a5d2d481..4b06c243 100644
--- a/tests/unit/conftest.py
+++ b/tests/unit/conftest.py
@@ -1,4 +1,6 @@
+import asyncio
 import json
+from functools import wraps
 from io import BytesIO
 from pathlib import Path
 from tempfile import NamedTemporaryFile

This PR introduces new lines of code, which could potentially introduce new complexity. This PR should be reviewed by experienced developers.

Please review the PR and categorize it as 'BLUE', 'RED', or 'BLACK' based on the complexity of the changes.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 84.15%. Comparing base (02490d1) to head (6aaf9bc).

Files Patch % Lines
tests/unit/test_domains.py 50.00% 1 Missing :warning:
tests/unit/test_wallet_ethereum.py 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #126 +/- ## ========================================== - Coverage 84.17% 84.15% -0.02% ========================================== Files 27 27 Lines 1131 1130 -1 Branches 188 188 ========================================== - Hits 952 951 -1 Misses 176 176 Partials 3 3 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.