Fixes #3417 #3420#3419
Closed
MIXgleb wants to merge 5 commits intowemake-services:masterfrom
Closed
Conversation
sobolevn
reviewed
May 18, 2025
| - Fixes `WPS432`, now it ignores magic numbers in `Literal`, #3397 | ||
|
|
||
|
|
||
| ## 1.1.1 |
Member
There was a problem hiding this comment.
Let's add it to the latest WIP version: 1.2.0
I can't support multiple bugfix releases realistically.
| Due to PEP 695, it's now allowed to use [] in the decorator only for `python3.12+`. | ||
|
|
||
| ```python | ||
| @decorator[T, V] |
Member
There was a problem hiding this comment.
Suggested change
| @decorator[T, V] | |
| @MyClassDecorator[T, V] |
| - Removes unnecessary WPS604 and WPS614 rules from the noqa.py, #3420 | ||
| - Fixes `NewStyledDecoratorViolation` for generic type specifications `my_func[T]`, #3417 | ||
|
|
||
| Due to PEP 695, it's now allowed to use [] in the decorator only for `python3.12+`. |
Member
There was a problem hiding this comment.
Suggested change
| Due to PEP 695, it's now allowed to use [] in the decorator only for `python3.12+`. | |
| Due to PEP-695, it's now allowed to use `[]` in the decorator only for `python3.12+`. |
| """ | ||
|
|
||
| if sys.version_info >= (3, 12): | ||
| wrong_decorators = [ |
Member
There was a problem hiding this comment.
Create common lists of wrong and correct decorators. Then extend them with version specific ones.
| def my_function(): ... | ||
|
|
||
| Only for ``python3.12+`` | ||
| @decorator[my_type](args) |
Member
There was a problem hiding this comment.
Please, use examples with clear classes, not functions. As I've shown above
Member
|
why did you close it? 🤔 |
Contributor
Author
|
I don't like 'dirty' commits when there are too many for one simple update. |
Member
|
@MIXgleb please, don't do this :) It is easier for me to review everything is one place. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I have made things!
Checklist
CHANGELOG.mdRelated issues
Closes #3417 #3420
Hi,
WPS466.Now, for
python312+it is allowed to use [] in decorators due to the PEP 695