|
33 | 33 | from typing import is_typeddict, is_protocol |
34 | 34 | from typing import reveal_type |
35 | 35 | from typing import dataclass_transform |
36 | | -from typing import no_type_check, no_type_check_decorator |
| 36 | +from typing import no_type_check |
37 | 37 | from typing import Type |
38 | 38 | from typing import NamedTuple, NotRequired, Required, ReadOnly, TypedDict, NoExtraItems |
39 | 39 | from typing import IO, TextIO, BinaryIO |
@@ -6376,35 +6376,6 @@ class F: |
6376 | 6376 | for clazz in [C, D, E, F]: |
6377 | 6377 | self.assertEqual(get_type_hints(clazz), expected_result) |
6378 | 6378 |
|
6379 | | - def test_meta_no_type_check(self): |
6380 | | - depr_msg = ( |
6381 | | - "'typing.no_type_check_decorator' is deprecated " |
6382 | | - "and slated for removal in Python 3.15" |
6383 | | - ) |
6384 | | - with self.assertWarnsRegex(DeprecationWarning, depr_msg): |
6385 | | - @no_type_check_decorator |
6386 | | - def magic_decorator(func): |
6387 | | - return func |
6388 | | - |
6389 | | - self.assertEqual(magic_decorator.__name__, 'magic_decorator') |
6390 | | - |
6391 | | - @magic_decorator |
6392 | | - def foo(a: 'whatevers') -> {}: |
6393 | | - pass |
6394 | | - |
6395 | | - @magic_decorator |
6396 | | - class C: |
6397 | | - def foo(a: 'whatevers') -> {}: |
6398 | | - pass |
6399 | | - |
6400 | | - self.assertEqual(foo.__name__, 'foo') |
6401 | | - th = get_type_hints(foo) |
6402 | | - self.assertEqual(th, {}) |
6403 | | - cth = get_type_hints(C.foo) |
6404 | | - self.assertEqual(cth, {}) |
6405 | | - ith = get_type_hints(C().foo) |
6406 | | - self.assertEqual(ith, {}) |
6407 | | - |
6408 | 6379 |
|
6409 | 6380 | class InternalsTests(BaseTestCase): |
6410 | 6381 | def test_collect_parameters(self): |
|
0 commit comments