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

Feature: lint python #574

Merged
merged 24 commits into from
Sep 26, 2024
Merged

Feature: lint python #574

merged 24 commits into from
Sep 26, 2024

Conversation

LoTerence
Copy link
Member

@LoTerence LoTerence commented Sep 20, 2024

Fixes #407

This PR installs and configures Black, isort, and flake8 linters and formatter for the python backend.

To test, run these commands in the /backend folder:

  1. poetry install
  2. poetry run black .
  3. poetry run isort .
  4. poetry run flake8

Changes

  • Installed Black formatter
  • Ran poetry run black . to reformat the entire python backend.
  • This^ command mostly just changed single quote strings to double quotes in 9 different files
  • Installed flake8 linter
  • Configured flake8 settings to not conflict with Black
  • Installed isort
  • configured isort settings to sync with Black and flake8
  • Ran poetry run isort . to sort the imports

My next optional suggestion: adding pre-commit hooks that automates linting and formatting before every commit:

@LoTerence LoTerence changed the title Feature/lint python Feature - lint python Sep 20, 2024
@LoTerence LoTerence changed the title Feature - lint python Feature: lint python Sep 20, 2024
@LoTerence LoTerence merged commit e3ec821 into develop Sep 26, 2024
@LoTerence LoTerence deleted the feature/lint-python branch September 26, 2024 07:47
LoTerence added a commit that referenced this pull request Sep 26, 2024
@LoTerence LoTerence removed the request for review from JimmyJuarez10 September 26, 2024 07:52
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.

2 participants