Merge remote-tracking branch 'origin' into support-dataclass-transform

* origin:
  Fix pip install -e in docs
  Upgrade Mypy
  Fix a few flake8 issues
  Upgrade flake8
  Upgrade other test runners
  Remove 3.6/3.7 references and change tests slightly
  Upgrade OS's that it is tested on
  Try to add something to the README
This commit is contained in:
Eric Masseran
2025-08-28 10:33:17 +02:00
17 changed files with 39 additions and 37 deletions

View File

@@ -134,7 +134,7 @@ TEST_GOTO = 2
TEST_REFERENCES = 3
grammar36 = parso.load_grammar(version='3.6')
grammar313 = parso.load_grammar(version='3.13')
class BaseTestCase(object):
@@ -238,7 +238,7 @@ class IntegrationTestCase(BaseTestCase):
should_be = set()
for match in re.finditer('(?:[^ ]+)', correct):
string = match.group(0)
parser = grammar36.parse(string, start_symbol='eval_input', error_recovery=False)
parser = grammar313.parse(string, start_symbol='eval_input', error_recovery=False)
parser_utils.move(parser.get_root_node(), self.line_nr)
node = parser.get_root_node()
module_context = script._get_module_context()
@@ -504,7 +504,7 @@ if __name__ == '__main__':
if arguments['--env']:
environment = get_system_environment(arguments['--env'])
else:
# Will be 3.6.
# Will be 3.13.
environment = get_default_environment()
import traceback

View File

@@ -26,7 +26,7 @@ def test_find_system_environments():
@pytest.mark.parametrize(
'version',
['3.6', '3.7', '3.8', '3.9']
['3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
)
def test_versions(version):
try:

View File

@@ -16,13 +16,13 @@ def test_on_code():
assert i.infer()
def test_generics_without_definition():
def test_generics_without_definition() -> None:
# Used to raise a recursion error
T = TypeVar('T')
class Stack(Generic[T]):
def __init__(self):
self.items = [] # type: List[T]
def __init__(self) -> None:
self.items: List[T] = []
def push(self, item):
self.items.append(item)

View File

@@ -91,7 +91,7 @@ class TestSetupReadline(unittest.TestCase):
}
# There are quite a few differences, because both Windows and Linux
# (posix and nt) libraries are included.
assert len(difference) < 30
assert len(difference) < 40
def test_local_import(self):
s = 'import test.test_utils'