-
Notifications
You must be signed in to change notification settings - Fork 24
Add Y091: Protocol method arg should not be pos-or-kw #442
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
Merged
Merged
Changes from 9 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
97294c7
Add Y058: Protocol method arg should not be pos-or-kw
JelleZijlstra b9dbfcf
Merge remote-tracking branch 'upstream/main' into protometh
JelleZijlstra 9178dd8
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] feb136a
Apply suggestions from code review
JelleZijlstra 5ecbf07
Apply suggestions from code review
JelleZijlstra ad2eca4
fix
JelleZijlstra 3e3b2c4
handle __
JelleZijlstra 5ca8ceb
Update pyi.py
JelleZijlstra 4b785ad
Update ERRORCODES.md
JelleZijlstra 4dbc9d3
Update pyi.py
JelleZijlstra da93b61
Update tests/protocol_arg.pyi
JelleZijlstra 06e5370
Update pyi.py
AlexWaygood 6dfb7e1
Merge branch 'main' into protometh
JelleZijlstra 7fbe43a
Fix post-merge
JelleZijlstra cfce08b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 8fc117a
Apply suggestions from code review
JelleZijlstra b991cc5
Disabled by default
JelleZijlstra 13fdaff
update test
JelleZijlstra e161263
fix more
JelleZijlstra 8c4ae42
Fix staticmethod
JelleZijlstra 877a5db
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 959e1f7
test old pos-only syntax
JelleZijlstra File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| from typing import Protocol | ||
|
|
||
| class P(Protocol): | ||
| def method1(self, arg: int) -> None: ... # Y062 Argument "arg" to protocol method "method1" should not be positional-or-keyword (suggestion: make it positional-only) | ||
| def method2(self, arg: str, /) -> None: ... | ||
| def method3(self, *, arg: str) -> None: ... | ||
| def method4(self, __arg: int) -> None: ... | ||
JelleZijlstra marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
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.
Uh oh!
There was an error while loading. Please reload this page.