mirror of
https://github.com/283375/arcaea-offline-pyside-ui.git
synced 2025-04-21 10:10:17 +00:00
using ruff as formatter & linter
This commit is contained in:
parent
0c6f4f4961
commit
da3ac7acb3
@ -4,11 +4,10 @@ repos:
|
|||||||
hooks:
|
hooks:
|
||||||
- id: end-of-file-fixer
|
- id: end-of-file-fixer
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
- repo: https://github.com/psf/black
|
|
||||||
rev: 23.1.0
|
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||||
|
rev: v0.4.9
|
||||||
hooks:
|
hooks:
|
||||||
- id: black
|
- id: ruff
|
||||||
- repo: https://github.com/PyCQA/isort
|
args: ["--fix"]
|
||||||
rev: 5.12.0
|
- id: ruff-format
|
||||||
hooks:
|
|
||||||
- id: isort
|
|
||||||
|
@ -24,19 +24,35 @@ classifiers = [
|
|||||||
"Homepage" = "https://github.com/ArcaeaOffline/client-pyside6"
|
"Homepage" = "https://github.com/ArcaeaOffline/client-pyside6"
|
||||||
"Bug Tracker" = "https://github.com/ArcaeaOffline/client-pyside6/issues"
|
"Bug Tracker" = "https://github.com/ArcaeaOffline/client-pyside6/issues"
|
||||||
|
|
||||||
[tool.black]
|
[tool.ruff]
|
||||||
force-exclude = '''
|
exclude = ["*_ui.py", "*_rc.py"]
|
||||||
(
|
|
||||||
ui/designer
|
|
||||||
| .*_ui.py
|
|
||||||
| .*_rc.py
|
|
||||||
)
|
|
||||||
'''
|
|
||||||
|
|
||||||
[tool.isort]
|
[tool.ruff.lint]
|
||||||
profile = "black"
|
# Full list: https://docs.astral.sh/ruff/rules
|
||||||
extend_skip = ["ui/designer"]
|
select = [
|
||||||
extend_skip_glob = ["*_ui.py", "*_rc.py"]
|
"E", # pycodestyle (Error)
|
||||||
|
"W", # pycodestyle (Warning)
|
||||||
|
"F", # pyflakes
|
||||||
|
"I", # isort
|
||||||
|
"PL", # pylint
|
||||||
|
"N", # pep8-naming
|
||||||
|
"FBT", # flake8-boolean-trap
|
||||||
|
"A", # flake8-builtins
|
||||||
|
"DTZ", # flake8-datetimez
|
||||||
|
"LOG", # flake8-logging
|
||||||
|
"Q", # flake8-quotes
|
||||||
|
"G", # flake8-logging-format
|
||||||
|
"PIE", # flake8-pie
|
||||||
|
"PT", # flake8-pytest-style
|
||||||
|
]
|
||||||
|
ignore = [
|
||||||
|
"E501", # line-too-long
|
||||||
|
"N802", # invalid-function-name
|
||||||
|
"N803", # invalid-argument-name
|
||||||
|
"N806", # non-lowercase-variable-in-function
|
||||||
|
"N815", # mixed-case-variable-in-class-scope
|
||||||
|
"N816", # mixed-case-variable-in-global-scope
|
||||||
|
]
|
||||||
|
|
||||||
[tool.pyright]
|
[tool.pyright]
|
||||||
ignore = ["**/__debug*.*"]
|
ignore = ["**/__debug*.*"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user