diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b969f40..89f29f0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python: [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12" ] + python: [ "3.8", "3.9", "3.10", "3.11", "3.12" ] name: python-${{ matrix.python }} steps: - name: Checkout diff --git a/README.md b/README.md index a4643c8..4c2d871 100644 --- a/README.md +++ b/README.md @@ -273,7 +273,7 @@ instead of `optional_converter`. Requirements and Installation ----------------------------- -You need Python 3.7 or higher. +You need Python 3.8 or higher. ```bash python3 -m pip install undictify diff --git a/docker-compose.yml b/docker-compose.yml index a00df7f..569c690 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,15 +2,6 @@ version: '2.4' services: - unit-tests-3-7: - build: - context: . - dockerfile: test/Dockerfile_3.7 - volumes: - - .:/undictify - working_dir: /undictify - entrypoint: ./test/install_from_local_and_run_code_checks.sh - unit-tests-3-8: build: context: . diff --git a/setup.py b/setup.py index 34ec1ce..f504868 100644 --- a/setup.py +++ b/setup.py @@ -14,11 +14,13 @@ url="http://github.com/Dobiasd/undictify", package_data={"undictify": ["py.typed"]}, packages=["undictify"], - python_requires=">=3.7", + python_requires=">=3.8", classifiers=( - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ), diff --git a/test/Dockerfile_3.7 b/test/Dockerfile_3.7 deleted file mode 100644 index 3d513ba..0000000 --- a/test/Dockerfile_3.7 +++ /dev/null @@ -1,4 +0,0 @@ -FROM python:3.7 - -RUN pip3 install --upgrade pip -RUN pip3 install pylint mypy diff --git a/undictify/_unpack.py b/undictify/_unpack.py index e71deeb..9d0bca6 100644 --- a/undictify/_unpack.py +++ b/undictify/_unpack.py @@ -269,7 +269,7 @@ def _get_value(func: WrappedOrFunc[TypeT], f'yields incorrect target type: ' f'{_get_type_name(type(result))}') return result - if Any not in allowed_types and not _isinstanceofone(value, allowed_types): + if Any not in allowed_types and not _isinstanceofone(value, allowed_types): # type: ignore if _is_enum_type(func): for entry in func: # type: ignore if value == entry.value: @@ -360,7 +360,7 @@ def _get_dict_value(func: Callable[..., TypeT], value: Any, skip_superfluous, convert_types, converters) return typed_dict - if func is Any: + if func is Any: # type: ignore return value return func(**value) @@ -517,7 +517,7 @@ def _is_union_of_builtins_type(the_type: Callable[..., TypeT]) -> bool: def _is_builtin_type(the_type: Callable[..., TypeT]) -> bool: """Return True if the type is a NoneType, str, int, float or bool.""" - return the_type in [str, int, bool, float, type(None)] # type: ignore + return the_type in [str, int, bool, float, type(None)] def _is_none_type(value: TypeT) -> bool: