From 6e17c85a57055c60a27bf5d67019fcc55514f849 Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Mon, 27 Apr 2026 15:29:08 +0200 Subject: [PATCH] Avoid flake8 issues --- jedi/inference/compiled/access.py | 1 - test/test_api/test_interpreter.py | 2 +- test/test_integration.py | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/jedi/inference/compiled/access.py b/jedi/inference/compiled/access.py index 86d34cc1..277c9b1d 100644 --- a/jedi/inference/compiled/access.py +++ b/jedi/inference/compiled/access.py @@ -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. diff --git a/test/test_api/test_interpreter.py b/test/test_api/test_interpreter.py index ce6f282f..64da73de 100644 --- a/test/test_api/test_interpreter.py +++ b/test/test_api/test_interpreter.py @@ -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'}, diff --git a/test/test_integration.py b/test/test_integration.py index 4415d3a8..da97465c 100644 --- a/test/test_integration.py +++ b/test/test_integration.py @@ -1,6 +1,5 @@ import os import sys -from collections import namedtuple import pytest