-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Labels
Description
Y011 appears to behave inconsistently when assigning a default value using = some_value or = module.some_value. In the first case it raises an error, while in the second it does not.
For example, this can be reproduced when trying to set a default value for email.parser.Parser.__init__ in typeshed (that's how I encountered it):
# error appears:
from email._policybase import compat32
def __init__(..., policy = compat32) ...
# error doesn't appear:
from email import _policybase
def __init__(..., policy = _policybase.compat32) ...As far as I know, the documentation does not mention that these two cases should be treated differently, so I wanted to report it in case this behavior is unintended.