Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Linting and Formatting to use Ruff instead #273

Merged
merged 19 commits into from
Nov 13, 2023
Merged

Conversation

seapagan
Copy link
Owner

@seapagan seapagan commented Nov 12, 2023

This increases development speed across the board and reduces many dev dependencies. As a result, the entire app should be typed appropriately, too.

The codebase is adjusted in this PR to pass all the linting errors, which was a more significant undertaking! I have set Ruff to be very strict, with a few exceptions as needed. Mypy also passes on strict mode for the whole codebase.

For this PR, the CLI functionality is omitted from test coverage as it has zero tests, bringing the overall coverage total down. The very next PR will fix this.

There is also a new GitHub Actions task to Lint and Format check the code on any push or PR

Signed-off-by: Grant Ramsay <seapagan@gmail.com>
Signed-off-by: Grant Ramsay <seapagan@gmail.com>
@seapagan seapagan self-assigned this Nov 12, 2023
pre-commit-ci bot and others added 8 commits November 12, 2023 09:20
Signed-off-by: Grant Ramsay <seapagan@gmail.com>
Signed-off-by: Grant Ramsay <seapagan@gmail.com>
Signed-off-by: Grant Ramsay <seapagan@gmail.com>
Signed-off-by: Grant Ramsay <seapagan@gmail.com>
Signed-off-by: Grant Ramsay <seapagan@gmail.com>
may fail a lot for now though

Signed-off-by: Grant Ramsay <seapagan@gmail.com>
Copy link

codecov bot commented Nov 12, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (fb29d08) 92.18% compared to head (caa8a28) 93.21%.
Report is 67 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #273      +/-   ##
===========================================
+ Coverage    92.18%   93.21%   +1.02%     
===========================================
  Files           23       23              
  Lines          576      575       -1     
===========================================
+ Hits           531      536       +5     
+ Misses          45       39       -6     
Files Coverage Δ
app/config/helpers.py 100.00% <100.00%> (ø)
app/config/settings.py 100.00% <100.00%> (ø)
app/database/helpers.py 100.00% <100.00%> (+5.26%) ⬆️
app/managers/auth.py 100.00% <100.00%> (+0.89%) ⬆️
app/managers/email.py 96.00% <100.00%> (ø)
app/managers/user.py 99.06% <100.00%> (+2.70%) ⬆️
app/models/user.py 93.75% <100.00%> (ø)
app/resources/auth.py 70.83% <100.00%> (ø)
app/resources/config_error.py 83.33% <100.00%> (ø)
app/resources/home.py 71.42% <100.00%> (+2.19%) ⬆️
... and 5 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Grant Ramsay <seapagan@gmail.com>
Signed-off-by: Grant Ramsay <seapagan@gmail.com>
crashes if the 204 function is annotated with return 'None' and
future annotations is imported

Signed-off-by: Grant Ramsay <seapagan@gmail.com>
Signed-off-by: Grant Ramsay <seapagan@gmail.com>
there is zero coverage for this atm, which is briging the API coverage right
down. The next PR will test that functionality and re-enable

Signed-off-by: Grant Ramsay <seapagan@gmail.com>
Signed-off-by: Grant Ramsay <seapagan@gmail.com>
(integration tests still disabled)

Signed-off-by: Grant Ramsay <seapagan@gmail.com>
imports like this should be excluded from coverage

Signed-off-by: Grant Ramsay <seapagan@gmail.com>
Signed-off-by: Grant Ramsay <seapagan@gmail.com>
@seapagan seapagan marked this pull request as ready for review November 13, 2023 13:10
@seapagan seapagan merged commit cf626bb into develop Nov 13, 2023
10 checks passed
@seapagan seapagan deleted the update-tooling branch November 13, 2023 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant