diff options
author | Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> | 2022-04-14 19:47:25 +0200 |
---|---|---|
committer | Daniël van Noord <13665637+DanielNoord@users.noreply.github.com> | 2022-04-14 20:06:24 +0200 |
commit | a693ea7e1785def007c5a80d379cc7aaf92f38a9 (patch) | |
tree | 30c130828abae0b2bc7c1a037e45886d7bf26a99 /tests/checkers/unittest_utils.py | |
parent | 8f872bf49c344d1d16b3573136d53b2cbda007c6 (diff) | |
download | pylint-git-a693ea7e1785def007c5a80d379cc7aaf92f38a9.tar.gz |
Use ``python-typing-update`` on second half of the ``tests`` directory
Diffstat (limited to 'tests/checkers/unittest_utils.py')
-rw-r--r-- | tests/checkers/unittest_utils.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/tests/checkers/unittest_utils.py b/tests/checkers/unittest_utils.py index 121bcef2e..1ac461141 100644 --- a/tests/checkers/unittest_utils.py +++ b/tests/checkers/unittest_utils.py @@ -4,7 +4,7 @@ """Tests for the pylint.checkers.utils module.""" -from typing import Dict, Union +from __future__ import annotations import astroid import pytest @@ -32,9 +32,7 @@ def testIsBuiltin(name, expected): "fn,kw", [("foo(3)", {"keyword": "bar"}), ("foo(one=a, two=b, three=c)", {"position": 1})], ) -def testGetArgumentFromCallError( - fn: str, kw: Union[Dict[str, int], Dict[str, str]] -) -> None: +def testGetArgumentFromCallError(fn: str, kw: dict[str, int] | dict[str, str]) -> None: with pytest.raises(utils.NoSuchArgumentError): node = astroid.extract_node(fn) utils.get_argument_from_call(node, **kw) @@ -43,9 +41,7 @@ def testGetArgumentFromCallError( @pytest.mark.parametrize( "fn,kw", [("foo(bar=3)", {"keyword": "bar"}), ("foo(a, b, c)", {"position": 1})] ) -def testGetArgumentFromCallExists( - fn: str, kw: Union[Dict[str, int], Dict[str, str]] -) -> None: +def testGetArgumentFromCallExists(fn: str, kw: dict[str, int] | dict[str, str]) -> None: node = astroid.extract_node(fn) assert utils.get_argument_from_call(node, **kw) is not None |