Avoid flake8 issues

This commit is contained in:
Dave Halter
2026-04-27 15:29:08 +02:00
parent 44600ea194
commit 6e17c85a57
3 changed files with 1 additions and 3 deletions
-1
View File
@@ -477,7 +477,6 @@ class DirectObjectAccess:
"""
name = None
args = ()
module = getattr_static(self._obj, '__module__', '')
if type(self._obj) is typing.Union: # zuban: ignore[comparison-overlap] # TODO zuban
# This is mostly formatted like `int | str` and we therefor need to
# check the type.
+1 -1
View File
@@ -663,7 +663,7 @@ def bar():
({'return': 'typing.Union[str, int]'}, ['int', 'str'], ''),
({'return': 'typing.Union["str", int]'}, ['int', 'str'], ''),
({'return': 'typing.Union["str", 1]'},
[] if sys.version_info >= (3, 14) else (['str'] if sys.version_info >= (3, 11) else []), ''),
(['str'] if (3, 14) > sys.version_info >= (3, 11) else []), ''),
({'return': 'typing.Optional[str]'}, ['NoneType', 'str'], ''),
({'return': 'typing.Optional[str, int]'}, [], ''), # Takes only one arg
({'return': 'typing.Any'},
-1
View File
@@ -1,6 +1,5 @@
import os
import sys
from collections import namedtuple
import pytest