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

chore: remove black #3437

Merged
merged 13 commits into from
Apr 12, 2024
Merged

chore: remove black #3437

merged 13 commits into from
Apr 12, 2024

Conversation

hay-kot
Copy link
Collaborator

@hay-kot hay-kot commented Apr 7, 2024

What type of PR is this?

(REQUIRED)

  • chore

What this PR does / why we need it:

Removes a dependency and replaces it with a faster alternative built into a tool we're already using.

Which issue(s) this PR fixes:

N/A

Special notes for your reviewer:

Note that we previously used black in python for generated code, now we just run py:fmt task after we generate code. Everything should still be formatted nicely and we have one less dependency :D

To Do

  • Remove VSCode Extension recomendations

Testing

CI / manual workflow tasks

@michael-genson
Copy link
Collaborator

On mobile so can't test, sorry if this is a dumb question - does this still work on alembic migrations? I see it was removed from alembic hooks, which is fine as long as it's caught on precommit, though it would be nice if it were automatically applied on alembic migrations

Regarding the VSCode extensions: not sure how much this matters as long as black is removed and precommit still catches formatting issues. Honestly I'd be happy just removing every formatting extension we have save for ruff/mypy/precommit. Ruff replaces flake8, pylance, isort, etc. Fewer tools is better IMO as long as the code is still formatted appropriately and it's easy for new devs to fix formating issues before opening PRs

@hay-kot hay-kot marked this pull request as ready for review April 12, 2024 01:26
Comment on lines +150 to +155
py:migrate:
desc: generates a new migration file e.g. task py:migrate:generate "add new column"
cmds:
- poetry run alembic revision --autogenerate -m "{{ .CLI_ARGS }}"
- task: py:format

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@michael-genson should auto-format alembic migrations and make it easier to run them.

@michael-genson michael-genson merged commit 9e6ae2e into mealie-next Apr 12, 2024
10 checks passed
@michael-genson michael-genson deleted the chore/remove-black branch April 12, 2024 01:36
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.

None yet

2 participants