You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But it's almost never what you want. Typically you'd use a protocol like this for a function that takes an argument p of type P. That function probably does p.write(some_buffer) or possibly p.write(arg=some_buffer), but almost certainly not both. So the protocol should either have a positional-only or a keyword-only arg, but a positional-or-keyword arg is probably a mistake.
I think it would be reasonable for flake8-pyi to warn about this.
The text was updated successfully, but these errors were encountered:
It's easy to write a protocol like this:
But it's almost never what you want. Typically you'd use a protocol like this for a function that takes an argument
p
of typeP
. That function probably doesp.write(some_buffer)
or possiblyp.write(arg=some_buffer)
, but almost certainly not both. So the protocol should either have a positional-only or a keyword-only arg, but a positional-or-keyword arg is probably a mistake.I think it would be reasonable for flake8-pyi to warn about this.
The text was updated successfully, but these errors were encountered: