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

fix all files using pre-commit #1170

Merged
merged 6 commits into from
Mar 5, 2024

Conversation

PanosParalakis
Copy link
Contributor

@PanosParalakis PanosParalakis commented Mar 4, 2024

Fix all files using pre-commit

Why

It looks like some files have not been checked using pre-commit hooks at the past. By manually running pre-commit against all errors found are resolved

What

  • Fix all errors to skipped files
  • Remove whitespace from docker related files
  • Remove whitespace from Makefile
  • Add missing .nvmrc file for managing node version
  • Requires migrations? No
  • Requires dependency updates? No

@PanosParalakis PanosParalakis added the experimental Is for experimenting outside of an issue/ticket label Mar 4, 2024
@PanosParalakis PanosParalakis requested review from eadpearce and a team March 4, 2024 11:26
@@ -132,8 +132,8 @@ def get_linked_models(

:param model TrackedModel: Get models linked to this model instance
:param transaction Transaction: Get latest approved versions of linked
models as of this transaction
:rtype Iterator[TrackedModel]: The linked models
models as of this transaction :rtype Iterator[TrackedModel]: The
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the :rtype meant to be on a new line, in keeping with the :param lines?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix applied

@@ -226,8 +228,8 @@ def skip_when_update_type(cls: Type[BusinessRule], update_types: Iterable[Update
"""
Skip business rule validation for given update types.

:param cls Type[BusinessRule]: The BusinessRule to decorate
:param update_types Iterable[int]: The UpdateTypes to skip
:param cls Type[BusinessRule]: The BusinessRule to decorate :param
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a line break before the second :param?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix applied

@PanosParalakis PanosParalakis force-pushed the experimental/pre-commit-code-formatting branch from 8bb6763 to 7835b39 Compare March 4, 2024 13:36
@@ -226,8 +229,10 @@ def skip_when_update_type(cls: Type[BusinessRule], update_types: Iterable[Update
"""
Skip business rule validation for given update types.

:param cls Type[BusinessRule]: The BusinessRule to decorate
:param update_types Iterable[int]: The UpdateTypes to skip
:param cls: The BusinessRule to decorate :param
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that second :param on this line a stray one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry no I have already pushed a fix for it :)

@paulpepper-trade paulpepper-trade requested a review from a team March 4, 2024 14:30
.nvmrc Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Mar 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.11%. Comparing base (223e146) to head (3744aec).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1170      +/-   ##
==========================================
- Coverage   93.11%   93.11%   -0.01%     
==========================================
  Files         580      580              
  Lines       43649    43646       -3     
  Branches     3139     3139              
==========================================
- Hits        40645    40641       -4     
- Misses       2393     2394       +1     
  Partials      611      611              

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

exporter/management/commands/upload_transactions.py Outdated Show resolved Hide resolved
common/business_rules.py Outdated Show resolved Hide resolved
@PanosParalakis PanosParalakis merged commit 05c978e into master Mar 5, 2024
4 checks passed
@PanosParalakis PanosParalakis deleted the experimental/pre-commit-code-formatting branch March 5, 2024 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
experimental Is for experimenting outside of an issue/ticket
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants