-
Notifications
You must be signed in to change notification settings - Fork 10
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
Replace black with ruff #470
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine by me, just a few places you missed. Some docs mention black
:
dodal/docs/developer/how-to/lint.rst
Line 4 in 081f82c
Code linting is handled by black_ and ruff_ run under pre-commit_. - black_ for code formatting
# Re-enable after https://github.com/DiamondLightSource/dodal/issues/311 | ||
# - repo: https://github.com/pre-commit/mirrors-mypy | ||
# rev: v1.7.1 | ||
# hooks: | ||
# - id: mypy | ||
# files: 'src/.*\.py$' | ||
# additional_dependencies: [types-requests, pydantic] | ||
# args: ["--ignore-missing-imports", "--show-traceback", "--no-strict-optional"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should: If we're going to remove this can we close #311?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, in the template typing is not handled in precommit, you do it with tox -e type-checking
(in dodal it is currently tox -e mypy
), which also runs in CI. Will add a closes.
97cbdf1
to
06c8e4c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thank you!
Closes #311
CI was starting to fail due to minor disagreements between black and ruff. This PR switches to the ruff formatter as standard like the copier template: https://github.com/DiamondLightSource/python-copier-template/blob/main/.pre-commit-config.yaml
Instructions to reviewer on how to test:
UndulatorDCM
to ophyd-async #461 and see if it fixes CIChecks for reviewer