You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also consider using precommit to lint and format on the commit, to take the hassle out of running the formatted manually. You can also include the npm formatter at the same time.
For example my .pre-commit-config.yaml is as follows:
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit# Ruff version.rev: v0.2.2hooks:
# Run the linter.
- id: ruffargs: [ --fix ]# Run the formatter.
- id: ruff-format
The text was updated successfully, but these errors were encountered:
What would be the benefit? I'm quite happy with using Black for formatting at the moment, it's helpful and quite snappy.
Not sure about adding linting either. I've never worked with Python in a professional setting, so the codebase is mostly me making stuff work in a non-consistent style. I'm also not particularly interested in refactoring code just to satisfy the linter. Adding it might prevent some bugs, but so far there haven't been a lot of those, and some decent test coverage is more important to me.
Consider migrating to ruff for linting and for formatting.
Ruff already implements the black formatting style mostly, as well as other formatting tools like isort etc.
Generally I use the following in my
pyproject.toml
fileAlso consider using precommit to lint and format on the commit, to take the hassle out of running the formatted manually. You can also include the npm formatter at the same time.
For example my
.pre-commit-config.yaml
is as follows:The text was updated successfully, but these errors were encountered: