RFC: from __future__ import annotations + migrate

This commit is contained in:
Ronny Pfannschmidt
2024-06-17 17:01:28 +02:00
parent 20dd1d6738
commit 9295f9ffff
242 changed files with 1961 additions and 1777 deletions

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