-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add Y091: Protocol method arg should not be pos-or-kw #442
Conversation
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This comment has been minimized.
This comment has been minimized.
pyi.py
Outdated
def check_arg_kinds(self, node: ast.FunctionDef | ast.AsyncFunctionDef) -> None: | ||
for pos_or_kw in node.args.args[1:]: # exclude "self" | ||
self.error(pos_or_kw, Y062.format(arg=pos_or_kw.arg, method=node.name)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This only allows protocols that use PEP-570 syntax, but typeshed doesn't use any PEP-570 syntax yet.
Also, what if it's a public protocol? In that case, it's probably a stub for a "real" protocol that exists at runtime, so stubtest will start complaining if a parameter is positional-only in the stub but positional-or-keyword at runtime. Maybe we should only complain about private protocols, similar to the way we only complain if a protocol/TypeVar/TypedDict is unused if the protocol/TypeVar/TypedDict is private?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fixed the code to also handle __
(typeshed-primer was unhappy with me about that).
Not sure about public protocols; it's probably also a bug in the public code. Let's go over the typeshed hits first to see if there are real-world examples of this problem.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We now handle both the old and new pos-only syntax. Since this discussion started, typeshed switched to PEP 570 and flake8-pyi started warning about the double underscore syntax, but for this check I think it's still useful to support both, in case some users are still using the old syntax in stubs.
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This comment has been minimized.
This comment has been minimized.
Some of the fallout from PyCQA/flake8-pyi#442. In each case, I looked at CPython to check how the protocol is being used.
Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
(#449 bagged Y062, so this will have to be Y063 now :) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
It's probably best to merge this as an off-by-default rule, and maybe we can eventually build something that alerts on a typeshed PR if new violations are introduced. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
unittest only calls this positionally. From PyCQA/flake8-pyi#442.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
⚠ Flake8 diff showing the effect of this PR on typeshed: > ./stdlib/asyncio/tasks.pyi:438:13: Y091 Argument "loop" to protocol method "__call__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/asyncio/tasks.pyi:439:13: Y091 Argument "coro" to protocol method "__call__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/codecs.pyi:92:24: Y091 Argument "errors" to protocol method "__call__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/codecs.pyi:95:24: Y091 Argument "errors" to protocol method "__call__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/concurrent/futures/_base.pyi:86:22: Y091 Argument "timeout" to protocol method "result" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/email/_policybase.pyi:12:24: Y091 Argument "policy" to protocol method "__call__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/importlib/abc.pyi:148:24: Y091 Argument "mode" to protocol method "open" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/importlib/abc.pyi:151:24: Y091 Argument "mode" to protocol method "open" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/importlib/abc.pyi:164:29: Y091 Argument "encoding" to protocol method "read_text" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/importlib/metadata/_meta.pyi:13:28: Y091 Argument "item" to protocol method "__contains__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/importlib/metadata/_meta.pyi:14:27: Y091 Argument "key" to protocol method "__getitem__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/importlib/metadata/_meta.pyi:19:23: Y091 Argument "name" to protocol method "get_all" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/importlib/metadata/_meta.pyi:19:34: Y091 Argument "failobj" to protocol method "get_all" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/importlib/metadata/_meta.pyi:21:23: Y091 Argument "name" to protocol method "get_all" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/importlib/metadata/_meta.pyi:21:34: Y091 Argument "failobj" to protocol method "get_all" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/importlib/metadata/_meta.pyi:24:23: Y091 Argument "name" to protocol method "get" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/importlib/metadata/_meta.pyi:24:34: Y091 Argument "failobj" to protocol method "get" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/importlib/metadata/_meta.pyi:26:23: Y091 Argument "name" to protocol method "get" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/importlib/metadata/_meta.pyi:26:34: Y091 Argument "failobj" to protocol method "get" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/importlib/metadata/_meta.pyi:35:29: Y091 Argument "encoding" to protocol method "read_text" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/pydoc.pyi:21:24: Y091 Argument "text" to protocol method "__call__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/pydoc.pyi:21:35: Y091 Argument "title" to protocol method "__call__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/shutil.pyi:84:13: Y091 Argument "path" to protocol method "__call__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/shutil.pyi:85:13: Y091 Argument "ignore_errors" to protocol method "__call__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/shutil.pyi:86:13: Y091 Argument "onerror" to protocol method "__call__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/shutil.pyi:95:13: Y091 Argument "path" to protocol method "__call__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/shutil.pyi:96:13: Y091 Argument "ignore_errors" to protocol method "__call__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/shutil.pyi:105:13: Y091 Argument "path" to protocol method "__call__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/shutil.pyi:106:13: Y091 Argument "ignore_errors" to protocol method "__call__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/shutil.pyi:114:13: Y091 Argument "path" to protocol method "__call__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/shutil.pyi:115:13: Y091 Argument "ignore_errors" to protocol method "__call__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/shutil.pyi:116:13: Y091 Argument "onerror" to protocol method "__call__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/shutil.pyi:123:19: Y091 Argument "path" to protocol method "__call__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/shutil.pyi:123:41: Y091 Argument "ignore_errors" to protocol method "__call__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/shutil.pyi:123:70: Y091 Argument "onerror" to protocol method "__call__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stdlib/unittest/runner.pyi:16:23: Y091 Argument "arg" to protocol method "writeln" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/__init__.pyi:19:24: Y091 Argument "handler" to protocol method "__call__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/__init__.pyi:22:24: Y091 Argument "exception_handler" to protocol method "__call__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:10:29: Y091 Argument "event" to protocol method "trigger_event" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:16:9: Y091 Argument "event" to protocol method "emit" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:17:9: Y091 Argument "data" to protocol method "emit" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:18:9: Y091 Argument "to" to protocol method "emit" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:19:9: Y091 Argument "room" to protocol method "emit" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:20:9: Y091 Argument "skip_sid" to protocol method "emit" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:21:9: Y091 Argument "namespace" to protocol method "emit" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:22:9: Y091 Argument "callback" to protocol method "emit" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:23:9: Y091 Argument "ignore_queue" to protocol method "emit" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:27:9: Y091 Argument "data" to protocol method "send" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:28:9: Y091 Argument "to" to protocol method "send" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:29:9: Y091 Argument "room" to protocol method "send" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:30:9: Y091 Argument "skip_sid" to protocol method "send" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:31:9: Y091 Argument "namespace" to protocol method "send" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:32:9: Y091 Argument "callback" to protocol method "send" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:33:9: Y091 Argument "ignore_queue" to protocol method "send" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:37:9: Y091 Argument "event" to protocol method "call" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:38:9: Y091 Argument "data" to protocol method "call" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:39:9: Y091 Argument "to" to protocol method "call" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:40:9: Y091 Argument "sid" to protocol method "call" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:41:9: Y091 Argument "namespace" to protocol method "call" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:42:9: Y091 Argument "timeout" to protocol method "call" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:43:9: Y091 Argument "ignore_queue" to protocol method "call" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:45:26: Y091 Argument "sid" to protocol method "enter_room" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:45:31: Y091 Argument "room" to protocol method "enter_room" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:45:42: Y091 Argument "namespace" to protocol method "enter_room" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:46:26: Y091 Argument "sid" to protocol method "leave_room" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:46:31: Y091 Argument "room" to protocol method "leave_room" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:46:42: Y091 Argument "namespace" to protocol method "leave_room" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:47:26: Y091 Argument "room" to protocol method "close_room" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:47:37: Y091 Argument "namespace" to protocol method "close_room" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:48:21: Y091 Argument "sid" to protocol method "rooms" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:48:26: Y091 Argument "namespace" to protocol method "rooms" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:49:27: Y091 Argument "sid" to protocol method "get_session" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:49:32: Y091 Argument "namespace" to protocol method "get_session" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:50:28: Y091 Argument "sid" to protocol method "save_session" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:50:33: Y091 Argument "session" to protocol method "save_session" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:50:42: Y091 Argument "namespace" to protocol method "save_session" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:51:23: Y091 Argument "sid" to protocol method "session" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:51:28: Y091 Argument "namespace" to protocol method "session" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:52:26: Y091 Argument "sid" to protocol method "disconnect" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/Flask-SocketIO/flask_socketio/namespace.pyi:52:31: Y091 Argument "namespace" to protocol method "disconnect" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/WTForms/wtforms/fields/core.pyi:23:24: Y091 Argument "field" to protocol method "__call__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/WebOb/webob/response.pyi:25:9: Y091 Argument "seconds" to protocol method "__call__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/bleach/bleach/html5lib_shim.pyi:20:24: Y091 Argument "name" to protocol method "__init__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/bleach/bleach/html5lib_shim.pyi:20:35: Y091 Argument "codec_info" to protocol method "__init__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/cffi/_cffi_backend.pyi:11:24: Y091 Argument "cdecl" to protocol method "__call__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/cffi/_cffi_backend.pyi:11:44: Y091 Argument "init" to protocol method "__call__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/fpdf2/fpdf/_fonttools_shims.pyi:10:24: Y091 Argument "glyphSet" to protocol method "__init__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/fpdf2/fpdf/_fonttools_shims.pyi:10:47: Y091 Argument "glyphName" to protocol method "__init__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/fpdf2/fpdf/_fonttools_shims.pyi:11:20: Y091 Argument "pen" to protocol method "draw" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/fpdf2/fpdf/_fonttools_shims.pyi:12:26: Y091 Argument "pen" to protocol method "drawPoints" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gdb/gdb/__init__.pyi:268:22: Y091 Argument "iterator" to protocol method "filter" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gdb/gdb/__init__.pyi:804:23: Y091 Argument "num" to protocol method "hscroll" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gdb/gdb/__init__.pyi:805:23: Y091 Argument "num" to protocol method "vscroll" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gdb/gdb/__init__.pyi:806:21: Y091 Argument "x" to protocol method "click" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gdb/gdb/__init__.pyi:806:29: Y091 Argument "y" to protocol method "click" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gdb/gdb/__init__.pyi:806:37: Y091 Argument "button" to protocol method "click" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gevent/gevent/_config.pyi:14:23: Y091 Argument "obj" to protocol method "__get__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gevent/gevent/_config.pyi:14:34: Y091 Argument "owner" to protocol method "__get__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gevent/gevent/_config.pyi:16:23: Y091 Argument "obj" to protocol method "__get__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gevent/gevent/_config.pyi:16:36: Y091 Argument "owner" to protocol method "__get__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gevent/gevent/_config.pyi:17:23: Y091 Argument "obj" to protocol method "__set__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gevent/gevent/_config.pyi:17:36: Y091 Argument "value" to protocol method "__set__" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gevent/gevent/_types.pyi:40:15: Y091 Argument "context" to protocol method "handle_error" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gevent/gevent/_types.pyi:40:39: Y091 Argument "type" to protocol method "handle_error" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gevent/gevent/_types.pyi:40:73: Y091 Argument "value" to protocol method "handle_error" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gevent/gevent/_types.pyi:40:102: Y091 Argument "tb" to protocol method "handle_error" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gevent/gevent/_types.pyi:42:19: Y091 Argument "nowait" to protocol method "run" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gevent/gevent/_types.pyi:42:41: Y091 Argument "once" to protocol method "run" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gevent/gevent/_types.pyi:46:22: Y091 Argument "how" to protocol method "break_" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gevent/gevent/_types.pyi:51:18: Y091 Argument "fd" to protocol method "io" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gevent/gevent/_types.pyi:51:38: Y091 Argument "events" to protocol method "io" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gevent/gevent/_types.pyi:51:51: Y091 Argument "ref" to protocol method "io" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gevent/gevent/_types.pyi:51:69: Y091 Argument "priority" to protocol method "io" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gevent/gevent/_types.pyi:52:26: Y091 Argument "fd" to protocol method "closing_fd" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gevent/gevent/_types.pyi:53:21: Y091 Argument "after" to protocol method "timer" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gevent/gevent/_types.pyi:53:35: Y091 Argument "repeat" to protocol method "timer" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gevent/gevent/_types.pyi:53:56: Y091 Argument "ref" to protocol method "timer" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gevent/gevent/_types.pyi:53:74: Y091 Argument "priority" to protocol method "timer" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gevent/gevent/_types.pyi:54:22: Y091 Argument "signum" to protocol method "signal" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gevent/gevent/_types.pyi:54:35: Y091 Argument "ref" to protocol method "signal" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gevent/gevent/_types.pyi:54:53: Y091 Argument "priority" to protocol method "signal" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gevent/gevent/_types.pyi:55:20: Y091 Argument "ref" to protocol method "idle" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gevent/gevent/_types.pyi:55:38: Y091 Argument "priority" to protocol method "idle" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gevent/gevent/_types.pyi:56:23: Y091 Argument "ref" to protocol method "prepare" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gevent/gevent/_types.pyi:56:41: Y091 Argument "priority" to protocol method "prepare" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gevent/gevent/_types.pyi:57:21: Y091 Argument "ref" to protocol method "check" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gevent/gevent/_types.pyi:57:39: Y091 Argument "priority" to protocol method "check" should probably not be positional-or-keyword. Make it positional-only, since usually you don't want to mandate a specific argument name
> ./stubs/gevent/gevent/_types.pyi:59:24: Y091 Argument "ref" to protocol method "fork" should probably not be positional-or-keyword. Make it positional-only, since usually you don't
... (truncated 173 lines) ...
|
Fixes #441