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

Isort fix #2303

Merged
merged 3 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
pip install -r requirements-dev.txt
```

To fix or preserve imports style, one can use `isort -rc .` command (requires the [isort](https://github.com/timothycrosley/isort) tool, see `.isort.cfg`).
To fix or preserve imports style, one can use `isort .` command (requires the [isort](https://github.com/PyCQA/isort) tool, see `.isort.cfg`).
Dismissed Show dismissed Hide dismissed

It is recommended to add a pre-commit hook to check whether imports in changed code
follow the conventions. Add a file `.git/hooks/pre-commit` with the following content
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ build-backend = "setuptools.build_meta"

[tool.isort]
sections = [
"FUTURE", "STDLIB", "THIRDPARTY", "QT", "TEST", "PICARD", "LOCALFOLDER",
"FUTURE", "STDLIB", "FIRSTPARTY", "THIRDPARTY", "QT", "TEST", "PICARD", "LOCALFOLDER",
"RESOURCES", "PICARD_UI"
]
default_section = "LOCALFOLDER"
known_first_party = []
known_picard = ["picard"]
known_picard_ui = ["picard.ui"]
known_qt = ["PyQt5"]
Expand Down
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
from setuptools.command.install import install
from setuptools.dist import Distribution


try:
from setuptools.command.build import build
except ImportError:
Expand Down Expand Up @@ -401,7 +402,10 @@ def compile_ui(uifile, pyfile):
if newer(uifile, pyfile):
compile_ui(uifile, pyfile)

from resources import compile, makeqrc
from resources import (
compile,
makeqrc,
)
makeqrc.main()
compile.main()

Expand Down
Loading