Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GÉANT Service Orchestrator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GÉANT Orchestration and Automation Team
GAP
GÉANT Service Orchestrator
Commits
2767d54e
Verified
Commit
2767d54e
authored
1 year ago
by
Karel van Klink
Browse files
Options
Downloads
Patches
Plain Diff
replace isort, flake8, and black with ruff extensions. Also add a LOT of new linting rules
parent
1295b282
No related branches found
Branches containing commit
No related tags found
1 merge request
!111
Feature/ruff everything party hat emoji
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pyproject.toml
+40
-45
40 additions, 45 deletions
pyproject.toml
tox.ini
+1
-15
1 addition, 15 deletions
tox.ini
with
41 additions
and
60 deletions
pyproject.toml
+
40
−
45
View file @
2767d54e
[tool.isort]
profile
=
"black"
line_length
=
120
skip
=
[
"venv"
,
".tox"
,
"gso/migrations"
,
"docs"
]
known_third_party
=
[
"pydantic"
,
"migrations"
]
known_first_party
=
[
"test"
,
"docs"
]
[tool.black]
line-length
=
120
target-version
=
[
"py311"
]
exclude
=
'''
(
/(
geant_service_orchestrator\.egg-info # exclude a few common directories in the
| \.git # root of the project
| \.*_cache
| \.tox
| venv
| docs
| gso/migrations
)/
)
'''
[tool.mypy]
exclude
=
[
"venv"
,
...
...
@@ -60,45 +36,64 @@ exclude = [
"venv"
,
"gso/migrations"
,
"docs"
,
"_ipam.py"
# TODO: remove
]
ignore
=
[
"C417"
,
"D100"
,
"D101"
,
"D102"
,
"D103"
,
"D104"
,
"D105"
,
"D106"
,
"D107"
,
"D202"
,
"D203"
,
"D213"
,
"E501"
,
"N806"
,
"B905"
,
"N805"
,
"B904"
,
"N803"
,
"N801"
,
"N815"
,
"N802"
,
"S101"
]
line-length
=
120
select
=
[
"A"
,
"ARG"
,
"B"
,
"BLE"
,
"C"
,
"COM"
,
"C4"
,
"C90"
,
"D"
,
"DTZ"
,
"E"
,
"EM"
,
"ERA"
,
"F"
,
"FA"
,
"FBT"
,
"FIX"
,
"FLY"
,
"FURB"
,
"G"
,
"I"
,
"ICN"
,
"INP"
,
"ISC"
,
"LOG"
,
"N"
,
"PERF"
,
"PGH"
,
"PIE"
,
"PL"
,
"PT"
,
"PTH"
,
"PYI"
,
"Q"
,
"RET"
,
"R"
,
"RET"
,
"RSE"
,
"RUF"
,
"S"
,
"SIM"
,
"SLF"
,
"T"
,
"T20"
,
"TD"
,
"TID"
,
"TRY"
,
"UP"
,
"W"
,
"YTT"
]
target-version
=
"py311"
...
...
@@ -106,7 +101,7 @@ target-version = "py311"
ban-relative-imports
=
"all"
[tool.ruff.per-file-ignores]
"test/*"
=
[
"
B033"
,
"N816"
,
"N802
"
]
"test/*"
=
[
"
S101"
,
"PLR2004
"
]
[tool.ruff.isort]
known-third-party
=
[
"pydantic"
,
"migrations"
]
...
...
This diff is collapsed.
Click to expand it.
tox.ini
+
1
−
15
View file @
2767d54e
[tox]
envlist
=
py311
[flake8]
; Allow >> on newline (W503), and allow cls as first argument for pydantic validators (B902)
ignore
=
B902,W503
exclude
=
.git,.*_cache,.eggs,*.egg-info,__pycache__,venv,.tox,gso/migrations,docs
enable-extensions
=
G
select
=
B,C,D,E,F,G,I,N,S,T,W,B902,B903,R
max-line-length
=
120
ban-relative-imports
=
true
[pytest]
markers
=
workflow
...
...
@@ -19,21 +10,16 @@ setenv =
OAUTH2_ACTIVE
=
False
deps
=
coverage
flake8
black
mypy
ruff
isort
types-requests
celery-stubs
-r
requirements.txt
commands
=
isort
-c
.
ruff
.
black
--check
.
ruff
format
--respect-gitignore
--preview
--check
.
mypy
.
flake8
coverage
erase
coverage
run
--source
gso
--omit
=
"gso/migrations/*"
-m pytest {posargs}
coverage
xml
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment