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
We considered stabilizing the behavior change that enables PYI066 for nono stub files (see #14059) as part of the 0.9 release (#15340) but ultimately decided against it because we found the following two reports in the ecosystem results:
def_stringify_exception(self, exc: BaseException) ->str:
try:
notes=getattr(exc, "__notes__", [])
exceptKeyError:
# Workaround for https://github.com/python/cpython/issues/98778 on# Python <= 3.9, and some 3.10 and 3.11 patch versions.HTTPError=getattr(sys.modules.get("urllib.error", None), "HTTPError", ())
ifsys.version_info< (3, 12) andisinstance(exc, HTTPError):
notes= []
else:
raise
While both cases rightfully fall into the scope of the rule, it is fairly opinionated to enforce PYI066. We have to decide if the rule should apply in those cases and, if so, if it should apply both for stub files and regular files.
The text was updated successfully, but these errors were encountered:
MichaReiser
changed the title
PYI066: Decide if the rule should apply if used in a more complex boolean expressionPYI066: Decide if the rule should apply for sys.version checks in boolean expressions
Jan 8, 2025
AlexWaygood
changed the title
PYI066: Decide if the rule should apply for sys.version checks in boolean expressionsPYI066: Decide if the rule should apply for sys.version_info checks in boolean expressions
Jan 8, 2025
We considered stabilizing the behavior change that enables
PYI066
for nono stub files (see #14059) as part of the 0.9 release (#15340) but ultimately decided against it because we found the following two reports in the ecosystem results:While both cases rightfully fall into the scope of the rule, it is fairly opinionated to enforce
PYI066
. We have to decide if the rule should apply in those cases and, if so, if it should apply both for stub files and regular files.The text was updated successfully, but these errors were encountered: