fixup: remove remove unused alias in code

This commit is contained in:
Ronny Pfannschmidt
2024-06-20 12:05:10 +02:00
parent 2a75bab290
commit 8e495e32c6
242 changed files with 1962 additions and 1780 deletions

View File

@@ -1,6 +1,8 @@
# mypy: allow-untyped-defs
"""Reproduces issue #3774"""
from __future__ import annotations
from unittest import mock
import pytest

View File

@@ -1,3 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
def test_init():
pass

View File

@@ -1,3 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
def test_foo():
pass

View File

@@ -1,3 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
def pytest_ignore_collect(collection_path):
return False

View File

@@ -1,3 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
def test():
pass

View File

@@ -1,3 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
def test_init():
pass

View File

@@ -1,3 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
def test_foo():
pass

View File

@@ -1,2 +1,5 @@
from __future__ import annotations
class pytest_something:
pass

View File

@@ -1,3 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
def test_foo():
pass

View File

@@ -1,4 +1,7 @@
# mypy: allow-untyped-defs
from __future__ import annotations
def pytest_configure(config):
import pytest

View File

@@ -1,5 +1,7 @@
# mypy: allow-untyped-defs
# content of conftest.py
from __future__ import annotations
import json
import pytest

View File

@@ -1,4 +1,7 @@
# mypy: allow-untyped-defs
# content of test_first.py
from __future__ import annotations
def test_1():
pass

View File

@@ -1,4 +1,7 @@
# mypy: allow-untyped-defs
# content of test_second.py
from __future__ import annotations
def test_2():
pass

View File

@@ -1,4 +1,7 @@
# mypy: allow-untyped-defs
# content of test_third.py
from __future__ import annotations
def test_3():
pass

View File

@@ -1,3 +1,5 @@
from __future__ import annotations
from dataclasses import dataclass
from dataclasses import field

View File

@@ -1,3 +1,5 @@
from __future__ import annotations
from dataclasses import dataclass
from dataclasses import field

View File

@@ -1,3 +1,5 @@
from __future__ import annotations
from dataclasses import dataclass
from dataclasses import field

View File

@@ -1,3 +1,5 @@
from __future__ import annotations
from dataclasses import dataclass
from dataclasses import field

View File

@@ -1,4 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
from dataclasses import dataclass
from dataclasses import InitVar

View File

@@ -1,4 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
from dataclasses import dataclass

View File

@@ -1,3 +1,5 @@
from __future__ import annotations
from dataclasses import dataclass
from dataclasses import field

View File

@@ -1,3 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
def test_this_is_ignored():
assert True

View File

@@ -1,4 +1,7 @@
# mypy: allow-untyped-defs
from __future__ import annotations
def test_doc():
"""
>>> 10 > 5

View File

@@ -1,4 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
import pytest

View File

@@ -1,3 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
def test():
pass

View File

@@ -1,4 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
import pytest

View File

@@ -1,3 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
def test_1(arg1):
pass

View File

@@ -1,4 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
import pytest

View File

@@ -1,3 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
def test_2(arg2):
pass

View File

@@ -1,4 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
import pytest

View File

@@ -1,4 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
import pytest

View File

@@ -1,4 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
import pytest

View File

@@ -1,3 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
def test_spam(spam):
assert spam == "spamspam"

View File

@@ -1,4 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
import pytest

View File

@@ -1,4 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
import pytest

View File

@@ -1,4 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
import pytest

View File

@@ -1,4 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
import pytest

View File

@@ -1,4 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
import pytest

View File

@@ -1,4 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
import pytest

View File

@@ -1,4 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
import pytest

View File

@@ -1,4 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
import pytest

View File

@@ -1,4 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
import pytest

View File

@@ -1,4 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
import pytest

View File

@@ -1,3 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
def test_hello():
pass

View File

@@ -1,7 +1,7 @@
# mypy: allow-untyped-defs
from __future__ import annotations
import pprint
from typing import List
from typing import Tuple
import pytest
@@ -16,7 +16,7 @@ def pytest_generate_tests(metafunc):
@pytest.fixture(scope="session")
def checked_order():
order: List[Tuple[str, str, str]] = []
order: list[tuple[str, str, str]] = []
yield order
pprint.pprint(order)

View File

@@ -1,4 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
import pytest

View File

@@ -1,4 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
import argparse
import pathlib

View File

@@ -1,3 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
def test_x():
pass

View File

@@ -1,4 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
import pytest

View File

@@ -1,4 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
import unittest
import pytest

View File

@@ -1,6 +1,8 @@
# mypy: allow-untyped-defs
"""Skipping an entire subclass with unittest.skip() should *not* call setUp from a base class."""
from __future__ import annotations
import unittest

View File

@@ -1,6 +1,8 @@
# mypy: allow-untyped-defs
"""Skipping an entire subclass with unittest.skip() should *not* call setUpClass from a base class."""
from __future__ import annotations
import unittest

View File

@@ -1,6 +1,8 @@
# mypy: allow-untyped-defs
"""setUpModule is always called, even if all tests in the module are skipped"""
from __future__ import annotations
import unittest

View File

@@ -1,9 +1,10 @@
# mypy: allow-untyped-defs
from typing import List
from __future__ import annotations
from unittest import IsolatedAsyncioTestCase
teardowns: List[None] = []
teardowns: list[None] = []
class AsyncArguments(IsolatedAsyncioTestCase):

View File

@@ -1,13 +1,14 @@
# mypy: allow-untyped-defs
"""Issue #7110"""
from __future__ import annotations
import asyncio
from typing import List
import asynctest
teardowns: List[None] = []
teardowns: list[None] = []
class Test(asynctest.TestCase):

View File

@@ -1,4 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
import unittest

View File

@@ -1,4 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
import warnings
import pytest

View File

@@ -1,4 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
import warnings
import pytest

View File

@@ -1,4 +1,6 @@
# mypy: allow-untyped-defs
from __future__ import annotations
from test_1 import func