From 10bb0bca32b7a106ae3607d7d74b206fb3bb8ebd Mon Sep 17 00:00:00 2001 From: Jason Lubken Date: Fri, 3 Feb 2023 10:08:32 -0500 Subject: [PATCH] Pyupgrades for 3.9-plus --- src/cfgenvy/env.py | 3 ++- src/cfgenvy/parser.py | 3 ++- src/cfgenvy/yaml.py | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/cfgenvy/env.py b/src/cfgenvy/env.py index cdd6f49..3fcb705 100644 --- a/src/cfgenvy/env.py +++ b/src/cfgenvy/env.py @@ -2,10 +2,11 @@ from __future__ import annotations +from collections.abc import Mapping from logging import getLogger from os import environ as osenviron +from re import Pattern from re import compile as re_compile -from typing import Mapping, Pattern from .yaml import yaml_implicit_type diff --git a/src/cfgenvy/parser.py b/src/cfgenvy/parser.py index 4d4680d..e0167b2 100644 --- a/src/cfgenvy/parser.py +++ b/src/cfgenvy/parser.py @@ -3,10 +3,11 @@ from __future__ import annotations from argparse import ArgumentParser +from collections.abc import Mapping, Sequence from logging import getLogger from os import environ as osenviron from sys import argv as sysargv -from typing import IO, Any, Mapping, Sequence +from typing import IO, Any from .env import Env from .yaml import yaml_loads diff --git a/src/cfgenvy/yaml.py b/src/cfgenvy/yaml.py index a001beb..fc52a3b 100644 --- a/src/cfgenvy/yaml.py +++ b/src/cfgenvy/yaml.py @@ -3,7 +3,8 @@ from __future__ import annotations from logging import getLogger -from typing import Any, Callable, Pattern +from re import Pattern +from typing import Any, Callable from yaml import dump as _yaml_dumps from yaml import load as _yaml_loads