-
-
Notifications
You must be signed in to change notification settings - Fork 107
Format to ruff specification #174
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
Open
mikemanger
wants to merge
17
commits into
jazzband:master
Choose a base branch
from
mikemanger:use-ruff
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
d81ada3
Tidy up import ordering
mikemanger 81e1620
Run ruff format
mikemanger 4451ceb
Update test models to use __str__
mikemanger 7c16201
Use f strings
mikemanger bc8a970
Add from clause to raise statements to fix B904
mikemanger 626426b
Ignore lambda use in tests
mikemanger ef077f8
Add init file for docs
mikemanger 6b1a411
Ignore and fix various ruff issues
mikemanger 45daeba
Add ruff config and workflow
mikemanger af4cab1
Move tox config to pyproject.toml
mikemanger 8dbca32
Move linting out of test matrix
mikemanger f603303
Make sure ruff workflow has code to work with
mikemanger 65c053d
Make sure both ruff linters are ran in workflow
mikemanger 41eaf8b
Update documentation to use ruff rules
mikemanger f254a6d
Update documentation config code style in comments.
mikemanger 6c03606
Update python link in docs config
mikemanger 1ad8b6d
Fix docs error on faq page
mikemanger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,10 @@ | ||
| # flake8: noqa | ||
| import importlib.metadata | ||
|
|
||
| try: # pragma: no cover | ||
| from django_hosts.defaults import patterns, host | ||
| from django_hosts.resolvers import (reverse, reverse_lazy, | ||
| reverse_host, reverse_host_lazy) | ||
| except ImportError: # pragma: no cover | ||
| try: | ||
| from django_hosts.defaults import host, patterns | ||
| from django_hosts.resolvers import reverse, reverse_host, reverse_host_lazy, reverse_lazy | ||
| except ImportError: | ||
| pass | ||
|
|
||
| __version__ = importlib.metadata.version('django-hosts') | ||
| __author__ = 'Jazzband members (https://jazzband.co/)' | ||
| __version__ = importlib.metadata.version("django-hosts") | ||
| __author__ = "Jazzband members (https://jazzband.co/)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I'd recommend adding an action for pre-commit hooks, instead of a ruff-only config.