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
{{ message }}
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.
I'm opening a new issue specifically for Protocols. A similar issue was made for abstract method, see #54, and has been fixed (though it's still open).
A similar situation occurs when subclassing typing.Protocol. Typically, the method body of a protocol will be empty (or ...). Our team likes to document protocol methods since there are usually more references to protocols than to actual concrete classes in our code.
This leads to a lot of false positives on DAR202 (Excess Returns), DAR302 (Excess Yield), and DAR402 (Excess exception) on these methods.
I expect the fix would be similar to the one applied to abstract methods from #54.
I haven't yet looked at the code, but I may be able to create a PR myself if it's not too complex ;)
Edit: it also affects yield.
The text was updated successfully, but these errors were encountered:
PhilMacKay
changed the title
DAR202 and DAR402: No return or raise statement in protocol method
DAR202, 302, and 402: Excess Return/Yield/Exception in protocol method
Oct 14, 2021
I'm opening a new issue specifically for Protocols. A similar issue was made for abstract method, see #54, and has been fixed (though it's still open).
A similar situation occurs when subclassing
typing.Protocol
. Typically, the method body of a protocol will be empty (or...
). Our team likes to document protocol methods since there are usually more references to protocols than to actual concrete classes in our code.This leads to a lot of false positives on DAR202 (Excess Returns), DAR302 (Excess Yield), and DAR402 (Excess exception) on these methods.
I expect the fix would be similar to the one applied to abstract methods from #54.
I haven't yet looked at the code, but I may be able to create a PR myself if it's not too complex ;)
Edit: it also affects
yield
.The text was updated successfully, but these errors were encountered: