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

Cleanup code #177

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

Cleanup code #177

wants to merge 15 commits into from

Conversation

FriedrichFroebel
Copy link
Contributor

Description

This PR performs a lot of cleanup on the existing code, including (but not limited to):

  • Use consistent formatting based upon black and ruff.
  • Replace flake8 and isort by ruff.
  • Resolve linting issues where possible, for example by cleaning up unused imports, checking undefined and unused variables etc. Some TODOs have been added where it has not been clear whether this has worked at all due to undefined variables.
  • Re-enable most of the tests decorated with skip after fixing the apparent issues.
  • Change test locale to plain English and replace __import__ by importlib. This is required for the conversion tests as the previously used German locale does not define number words at the moment.

How Has This Been Tested?

  • The application can start successfully in a local setup.
  • The tests are able to run without errors locally.
  • All linter findings where reviewed manually.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

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

CodeQL found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.

@FriedrichFroebel FriedrichFroebel marked this pull request as draft December 29, 2024 17:53
@FriedrichFroebel FriedrichFroebel marked this pull request as ready for review December 29, 2024 18:19
@FriedrichFroebel
Copy link
Contributor Author

Although CI passes, I am going to leave this rather large PR open for now. Feel free to give it a try (consider backing up your database beforehand) and report back when there are any issues with this.

I will have a look at this again later on as well before actually merging. (The CodeQL errors are unrelated and have already existed in the old code.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant