mirror of
https://github.com/davidhalter/jedi.git
synced 2026-04-28 07:05:29 +08:00
Avoid flake8 issues
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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,6 +1,5 @@
|
||||
import os
|
||||
import sys
|
||||
from collections import namedtuple
|
||||
|
||||
import pytest
|
||||
|
||||
|
||||
Reference in New Issue
Block a user