Update wemake-services/wemake-python-styleguide action to v1 #24
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.
This PR contains the following updates:
0.19.1
->1.0.0
Release Notes
wemake-services/wemake-python-styleguide (wemake-services/wemake-python-styleguide)
v1.0.0
Compare Source
Ruff
This release introduces the new main concept:
ruff
compatibility.Now
WPS
is the onlyflake8
plugin that is installed.Other things are done by
ruff
.It is faster, it has autofixing, there are lots of rules.
Basically, this way
WPS
just gain lotsof new rule and plugins almost for free.
It is now stricter than ever!
WPS
now officially supportsALL
ruff
existing rules. This means that there are no conflictsbetween two linters.
To run
WPS
andruff
together, use:You can copy our configuration from
pyproject.toml
(forruff
) andsetup.cfg
(forflake8
).Black
WPS
can now also be used withblack
with default configuration.However, we recommend using
ruff format
instead.Speed
WPS
got a lot faster! Because:flake8
pluginsruff
Running
0.19.2
(previous version) on https://github.com/dry-python/returnsThe same on
1.0.0
:Which is 2.4x times faster!
Integrations
We also significantly improved all the integrations!
WPS
can now be used as first-classpre-commit
hook with:Our GitHub Action also got a lot of new options and fixes.
Removals
python3.9
supportnitpick
supportflake8-commas
,flake8-isort
,flake8-debugger
,flake8-string-format
,flake8-quotes
,flake8-comprehensions
,flake8-bugbear
,flake8-docstrings
,flake8-eradicate
,flake8-bandit
,flake8-broken-line
,flake8-rst-docstrings
,pep8-naming
support, use
ruff format
andruff check
insteaddarglint
support, because it is unmaintainedWPS113
, because is covered bypylint
linterWPS119
, because is covered bypylint
linterWPS125
, because it is covered byruff
linterWPS302
, because it is covered byruff
formatterWPS304
, because it is covered byruff
formatterWPS305
, because it is covered byruff
formatterWPS306
, because it is covered byruff
formatterWPS309
, because it is covered byruff
formatterWPS310
, because it is covered byruff
formatterWPS313
, because it is covered byruff
formatterWPS315
, because it is covered byruff
formatterWPS316
, because it is covered byruff
linterWPS317
, because it is covered byruff
formatterWPS318
, because it is covered byruff
formatterWPS319
, because it is covered byruff
formatterWPS320
, because it is covered byruff
formatterWPS323
, because it is covered byruff
formatterWPS326
, because it is covered byruff
linterWPS329
, because it is covered byruff
linterWPS331
, because it is covered byruff
linterWPS333
, because is covered bypylint
linterWPS337
, because it is covered byruff
formatterWPS340
, because it is covered byruff
formatterWPS341
, because it is covered byruff
formatterWPS343
, because it is covered byruff
formatterWPS348
, because it conflicts withruff
formatterWPS351
, because it is covered byruff
linterWPS352
, because it is covered byruff
formatterWPS355
, because it is covered byruff
formatterWPS360
, because it is covered byruff
formatterWPS361
, because it is covered byruff
formatterWPS415
, because is covered byruff
linterWPS417
, because is covered byruff
linterWPS419
, because is covered byruff
linterWPS423
, because is covered byruff
linterWPS424
, because is covered byruff
linterWPS425
, because is covered byruff
linterWPS428
, because is covered byruff
linterWPS433
, because is covered bypylint
linterWPS434
, because is covered bypylint
linterWPS436
, because is covered bypylint
linterWPS437
, because is covered byruff
linterWPS440
, becauseit was buggy and is covered by
mypy
, #3209WPS442
, becauseit was buggy and is covered by
mypy
, #3209WPS450
, because is covered bypylint
linterWPS452
, because is covered byruff
linterWPS454
, because is covered byruff
linterWPS456
, because is covered byruff
linterWPS465
, because|
is now heavily used by typingWPS467
, because is covered bypylint
linterWPS502
, because is covered byruff
linterWPS503
, because is covered byruff
linterWPS507
, because is covered bypylint
linterWPS508
, because is covered byruff
linterWPS510
, because is covered bypylint
linterWPS514
, because is covered bypylint
linterWPS528
, because is covered bypylint
linterWPS525
, because is covered byruff
linterWPS526
, because is covered byruff
linterWPS521
, because is covered byruff
linterWPS609
, because is covered bypylint
linter--i-control-code
setting,if you want to disable some violations, just use
# noqa
or--ignore
with code that you want to exclude, there's no need
to create one more way of disabling some specific violations
Features
python3.13
supportassert
statements forWPS520
, #3112:=
) in comprehesions, #3121pass
incase
bodies, #2642WPS600
, when creating anEnum
, #2506WPS441
inassert
statements, #2543self
,cls
, andmcs
as argumentsfor
WPS211
complexity check anymore, #2394_
) with exactly 3 digits after it inWPS303
, #3120in
@dataclass
es forWPS601
, #1926@dataclass
es inWPS230
, #2448in
@overload
definitions forWPS211
, #1957hasattr
builtin function, #2228is not
andnot in
as negated conditions inWPS504
, #2617if/elif/else
to be negated inWPS504
, #2617lambda
assigns to special attributes, #1733if
s andelif
s, #2241case
pattens inmatch
, #3206match
subjects, #3201case
statements, #3202except
with too many exceptionsPEP695
type paramsraise SystemExit
, usesys.exit
instead, #1786match ...
subjects, #3217--allowed-module-metadata
and--forbidden-module-metadata
configuration options for
WPS410
, #3060--allowed-domain-names
also affectWPS11
to allow custom short variable names, #2554
wemake-python-styleguide
as apre-commit
hook, #2588cwd:
parameter to specifywhere your configuration file is, #2474
fail_workflow:
parameter to not failthe workflow even if the check did find any issues
filter_mode:
parameter to specifyhow ReviewDog will filter found violations,
see https://github.com/reviewdog/reviewdog#filter-mode #2239
Bugfixes
WPS217
to allow simple calls inf
strings, #3150WPS217
not to raise on emptyf
strings,because
ruff check
handles that now for usOverusedStringViolation
not to include'...'
stringastor
package in favour ofast.unparse
WPS210
to not count nested local variables in nested scopes #3108IterableUnpackingViolation
with generic types andTypeVarTuple
WPS469
detecting incorrect names of raised exceptions, #3109WPS221
to ignore PEP695'sTypeAlias
from line complexity checksWPS474
to only count import collisions in the same context, #2962WPS612
to count defaults in function definitions, #2478WPS322
with multiline strings detectioncase:
statementsWPS314
not detectingmatch
statementsmatch
+case
does not increase cognitive complexityMisc
ondivi
doc for legacy codebasesruff
ast
nodes from code:ast.Num
,ast.Bytes
,ast.Str
,ast.NamedConstant
, etcv0.19.2
Compare Source
Bugfixes
WrongEmptyLinesCountViolation
crash onCallable[..., ...]
#2899Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.