forked from VimPlug/jedi
Avoid flake8 issues
This commit is contained in:
@@ -477,7 +477,6 @@ class DirectObjectAccess:
|
|||||||
"""
|
"""
|
||||||
name = None
|
name = None
|
||||||
args = ()
|
args = ()
|
||||||
module = getattr_static(self._obj, '__module__', '')
|
|
||||||
if type(self._obj) is typing.Union: # zuban: ignore[comparison-overlap] # TODO zuban
|
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
|
# This is mostly formatted like `int | str` and we therefor need to
|
||||||
# check the type.
|
# check the type.
|
||||||
|
|||||||
@@ -663,7 +663,7 @@ def bar():
|
|||||||
({'return': 'typing.Union[str, int]'}, ['int', 'str'], ''),
|
({'return': 'typing.Union[str, int]'}, ['int', 'str'], ''),
|
||||||
({'return': 'typing.Union["str", int]'}, ['int', 'str'], ''),
|
({'return': 'typing.Union["str", int]'}, ['int', 'str'], ''),
|
||||||
({'return': 'typing.Union["str", 1]'},
|
({'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]'}, ['NoneType', 'str'], ''),
|
||||||
({'return': 'typing.Optional[str, int]'}, [], ''), # Takes only one arg
|
({'return': 'typing.Optional[str, int]'}, [], ''), # Takes only one arg
|
||||||
({'return': 'typing.Any'},
|
({'return': 'typing.Any'},
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from collections import namedtuple
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user