Skip to content

Commit f4ca099

Browse files
authored
Merge pull request #2066 from davidhalter/ci
Upgrade test runners, Mypy and flake8
2 parents a10b158 + d411290 commit f4ca099

File tree

16 files changed

+34
-35
lines changed

16 files changed

+34
-35
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ jobs:
66
runs-on: ${{ matrix.os }}
77
strategy:
88
matrix:
9-
os: [ubuntu-20.04, windows-2019]
10-
python-version: ["3.13", "3.12", "3.11", "3.10", "3.9", "3.8", "3.7", "3.6"]
11-
environment: ['3.8', '3.13', '3.12', '3.11', '3.10', '3.9', '3.7', '3.6', 'interpreter']
9+
os: [ubuntu-24.04, windows-2022]
10+
python-version: ["3.13", "3.12", "3.11", "3.10", "3.9", "3.8"]
11+
environment: ['3.8', '3.13', '3.12', '3.11', '3.10', '3.9', 'interpreter']
1212
steps:
1313
- name: Checkout code
1414
uses: actions/checkout@v4
@@ -35,7 +35,7 @@ jobs:
3535
JEDI_TEST_ENVIRONMENT: ${{ matrix.environment }}
3636

3737
code-quality:
38-
runs-on: ubuntu-20.04
38+
runs-on: ubuntu-24.04
3939
steps:
4040
- name: Checkout code
4141
uses: actions/checkout@v4
@@ -51,7 +51,7 @@ jobs:
5151
python -m mypy jedi sith.py setup.py
5252
5353
coverage:
54-
runs-on: ubuntu-20.04
54+
runs-on: ubuntu-24.04
5555

5656
steps:
5757
- name: Checkout code

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Features and Limitations
102102
Jedi's features are listed here:
103103
`Features <https://jedi.readthedocs.org/en/latest/docs/features.html>`_.
104104

105-
You can run Jedi on Python 3.6+ but it should also
105+
You can run Jedi on Python 3.8+ but it should also
106106
understand code that is older than those versions. Additionally you should be
107107
able to use `Virtualenvs <https://jedi.readthedocs.org/en/latest/docs/api.html#environments>`_
108108
very well.

docs/docs/features.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Jedi's main API calls and features are:
1616
Basic Features
1717
--------------
1818

19-
- Python 3.6+ support
19+
- Python 3.8+ support
2020
- Ignores syntax errors and wrong indentation
2121
- Can deal with complex module / function / class structures
2222
- Great ``virtualenv``/``venv`` support

jedi/api/environment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
_VersionInfo = namedtuple('VersionInfo', 'major minor micro') # type: ignore[name-match]
2424

25-
_SUPPORTED_PYTHONS = ['3.13', '3.12', '3.11', '3.10', '3.9', '3.8', '3.7', '3.6']
25+
_SUPPORTED_PYTHONS = ['3.13', '3.12', '3.11', '3.10', '3.9', '3.8']
2626
_SAFE_PATHS = ['/usr/bin', '/usr/local/bin']
2727
_CONDA_VAR = 'CONDA_PREFIX'
2828
_CURRENT_VERSION = '%s.%s' % (sys.version_info.major, sys.version_info.minor)

jedi/cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def clear_time_caches(delete_all: bool = False) -> None:
2828
:param delete_all: Deletes also the cache that is normally not deleted,
2929
like parser cache, which is important for faster parsing.
3030
"""
31-
global _time_caches
31+
global _time_caches # noqa: F824
3232

3333
if delete_all:
3434
for cache in _time_caches.values():

jedi/debug.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def _lazy_colorama_init():
2121
raise ImportError
2222
else:
2323
# Use colorama for nicer console output.
24-
from colorama import Fore, init # type: ignore[import]
24+
from colorama import Fore, init # type: ignore[import, unused-ignore]
2525
from colorama import initialise
2626

2727
def _lazy_colorama_init(): # noqa: F811

jedi/inference/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,14 @@ def execute(value, arguments):
122122
return value_set
123123

124124
# mypy doesn't suppport decorated propeties (https://github.com/python/mypy/issues/1362)
125-
@property # type: ignore[misc]
125+
@property
126126
@inference_state_function_cache()
127127
def builtins_module(self):
128128
module_name = 'builtins'
129129
builtins_module, = self.import_module((module_name,), sys_path=[])
130130
return builtins_module
131131

132-
@property # type: ignore[misc]
132+
@property
133133
@inference_state_function_cache()
134134
def typing_module(self):
135135
typing_module, = self.import_module(('typing',))

jedi/inference/docstrings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def _get_numpy_doc_string_cls():
4848
global _numpy_doc_string_cache
4949
if isinstance(_numpy_doc_string_cache, (ImportError, SyntaxError)):
5050
raise _numpy_doc_string_cache
51-
from numpydoc.docscrape import NumpyDocString # type: ignore[import]
51+
from numpydoc.docscrape import NumpyDocString # type: ignore[import, unused-ignore]
5252
_numpy_doc_string_cache = NumpyDocString
5353
return _numpy_doc_string_cache
5454

@@ -109,7 +109,7 @@ def _expand_typestr(type_str):
109109
yield type_str.split('of')[0]
110110
# Check if type has is a set of valid literal values eg: {'C', 'F', 'A'}
111111
elif type_str.startswith('{'):
112-
node = parse(type_str, version='3.7').children[0]
112+
node = parse(type_str, version='3.13').children[0]
113113
if node.type == 'atom':
114114
for leaf in getattr(node.children[1], "children", []):
115115
if leaf.type == 'number':

jedi/inference/value/module.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def is_module(self):
8080
def is_stub(self):
8181
return False
8282

83-
@property # type: ignore[misc]
83+
@property
8484
@inference_state_method_cache()
8585
def name(self):
8686
return self._module_name_class(self, self.string_names[-1])
@@ -138,7 +138,7 @@ class ModuleValue(ModuleMixin, TreeValue):
138138
api_type = 'module'
139139

140140
def __init__(self, inference_state, module_node, code_lines, file_io=None,
141-
string_names=None, is_package=False):
141+
string_names=None, is_package=False) -> None:
142142
super().__init__(
143143
inference_state,
144144
parent_context=None,
@@ -149,7 +149,7 @@ def __init__(self, inference_state, module_node, code_lines, file_io=None,
149149
self._path: Optional[Path] = None
150150
else:
151151
self._path = file_io.path
152-
self.string_names = string_names # Optional[Tuple[str, ...]]
152+
self.string_names: Optional[tuple[str, ...]] = string_names
153153
self.code_lines = code_lines
154154
self._is_package = is_package
155155

jedi/inference/value/namespace.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def get_filters(self, origin_scope=None):
3838
def get_qualified_names(self):
3939
return ()
4040

41-
@property # type: ignore[misc]
41+
@property
4242
@inference_state_method_cache()
4343
def name(self):
4444
string_name = self.py__package__()[-1]

0 commit comments

Comments
 (0)