diff options
author | Hernan Grecco <hgrecco@gmail.com> | 2023-05-01 19:20:56 -0300 |
---|---|---|
committer | Hernan Grecco <hgrecco@gmail.com> | 2023-05-01 19:20:56 -0300 |
commit | b1c01862a3811f77cca726675b52a32418c4d853 (patch) | |
tree | e4094cea77cd6b9f00515328a2b7fb5993dcf02e | |
parent | d0442e776bff3053ef900143cd64facf173e1650 (diff) | |
download | pint-b1c01862a3811f77cca726675b52a32418c4d853.tar.gz |
Run pyupgrade --py39-plus
-rw-r--r-- | pint/compat.py | 3 | ||||
-rw-r--r-- | pint/facets/context/definitions.py | 3 | ||||
-rw-r--r-- | pint/facets/context/objects.py | 3 | ||||
-rw-r--r-- | pint/facets/group/definitions.py | 2 | ||||
-rw-r--r-- | pint/facets/group/objects.py | 2 | ||||
-rw-r--r-- | pint/facets/system/definitions.py | 2 | ||||
-rw-r--r-- | pint/facets/system/objects.py | 3 | ||||
-rw-r--r-- | pint/formatting.py | 3 | ||||
-rw-r--r-- | pint/util.py | 3 |
9 files changed, 14 insertions, 10 deletions
diff --git a/pint/compat.py b/pint/compat.py index f58e9cb..7b48efa 100644 --- a/pint/compat.py +++ b/pint/compat.py @@ -17,7 +17,8 @@ from importlib import import_module from io import BytesIO from numbers import Number from collections.abc import Mapping -from typing import Any, NoReturn, Callable, Generator, Iterable +from typing import Any, NoReturn, Callable +from collections.abc import Generator, Iterable def missing_dependency( diff --git a/pint/facets/context/definitions.py b/pint/facets/context/definitions.py index 07eb92f..833857e 100644 --- a/pint/facets/context/definitions.py +++ b/pint/facets/context/definitions.py @@ -12,7 +12,8 @@ import itertools import numbers import re from dataclasses import dataclass -from typing import TYPE_CHECKING, Any, Callable, Iterable +from typing import TYPE_CHECKING, Any, Callable +from collections.abc import Iterable from ... import errors from ..plain import UnitDefinition diff --git a/pint/facets/context/objects.py b/pint/facets/context/objects.py index bec2a43..38d8805 100644 --- a/pint/facets/context/objects.py +++ b/pint/facets/context/objects.py @@ -10,7 +10,8 @@ from __future__ import annotations import weakref from collections import ChainMap, defaultdict -from typing import Any, Iterable +from typing import Any +from collections.abc import Iterable from ...facets.plain import UnitDefinition from ...util import UnitsContainer, to_units_container diff --git a/pint/facets/group/definitions.py b/pint/facets/group/definitions.py index 48c6f4b..554a63b 100644 --- a/pint/facets/group/definitions.py +++ b/pint/facets/group/definitions.py @@ -8,7 +8,7 @@ from __future__ import annotations -from typing import Iterable +from collections.abc import Iterable from dataclasses import dataclass from ..._typing import Self diff --git a/pint/facets/group/objects.py b/pint/facets/group/objects.py index a0a81be..200a323 100644 --- a/pint/facets/group/objects.py +++ b/pint/facets/group/objects.py @@ -8,7 +8,7 @@ from __future__ import annotations -from typing import Generator, Iterable +from collections.abc import Generator, Iterable from ...util import SharedRegistryObject, getattr_maybe_raise from .definitions import GroupDefinition diff --git a/pint/facets/system/definitions.py b/pint/facets/system/definitions.py index 893c510..1ce8269 100644 --- a/pint/facets/system/definitions.py +++ b/pint/facets/system/definitions.py @@ -8,7 +8,7 @@ from __future__ import annotations -from typing import Iterable +from collections.abc import Iterable from dataclasses import dataclass from ..._typing import Self diff --git a/pint/facets/system/objects.py b/pint/facets/system/objects.py index 7af65a6..69b1c84 100644 --- a/pint/facets/system/objects.py +++ b/pint/facets/system/objects.py @@ -11,7 +11,8 @@ from __future__ import annotations import numbers -from typing import Any, Iterable +from typing import Any +from collections.abc import Iterable from ..._typing import Self diff --git a/pint/formatting.py b/pint/formatting.py index 637d838..880f55b 100644 --- a/pint/formatting.py +++ b/pint/formatting.py @@ -13,7 +13,8 @@ from __future__ import annotations import functools import re import warnings -from typing import Callable, Iterable, Any +from typing import Callable, Any +from collections.abc import Iterable from numbers import Number from .babel_names import _babel_lengths, _babel_units diff --git a/pint/util.py b/pint/util.py index 807c3ac..149945b 100644 --- a/pint/util.py +++ b/pint/util.py @@ -27,10 +27,9 @@ from typing import ( TypeAlias, Callable, TypeVar, - Hashable, - Generator, Any, ) +from collections.abc import Hashable, Generator from .compat import NUMERIC_TYPES, tokenizer from .errors import DefinitionSyntaxError |