diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index edcd18035..1e1c42f75 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,10 +1,10 @@ repos: - repo: https://github.com/psf/black - rev: '22.3.0' + rev: '24.4.2' hooks: - id: black - repo: https://github.com/timothycrosley/isort - rev: '5.12.0' + rev: '5.13.2' hooks: - id: isort diff --git a/requirements-dev.txt b/requirements-dev.txt index a250d7919..6cad908ec 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -26,8 +26,8 @@ pre-commit>=2.16 pytest>=4.1 pytest-cov>=2.6 -black==23.7.0 +black==24.4.2 build==0.5.1 click==8.0.4 -isort==5.12.0 +isort==5.13.2 tox==3.23.1 diff --git a/troposphere/__init__.py b/troposphere/__init__.py index a9bb3cd95..f2797ac8f 100644 --- a/troposphere/__init__.py +++ b/troposphere/__init__.py @@ -83,18 +83,15 @@ def is_aws_object_subclass(cls: Any) -> bool: @overload def encode_to_dict( obj: Union[Dict[str, Any], JSONreprProtocol, ToDictProtocol] -) -> Dict[str, Any]: - ... +) -> Dict[str, Any]: ... @overload -def encode_to_dict(obj: Union[List[Any], Tuple[Any]]) -> List[Dict[str, Any]]: - ... +def encode_to_dict(obj: Union[List[Any], Tuple[Any]]) -> List[Dict[str, Any]]: ... @overload -def encode_to_dict(obj: Optional[str]) -> Optional[str]: - ... +def encode_to_dict(obj: Optional[str]) -> Optional[str]: ... def encode_to_dict( diff --git a/troposphere/openstack/heat.py b/troposphere/openstack/heat.py index c8f18056b..7da1abd41 100644 --- a/troposphere/openstack/heat.py +++ b/troposphere/openstack/heat.py @@ -7,6 +7,7 @@ strings. For this reason, we duplicate the AWS::AutoScaling::AutoScalingGroup and change these types. """ + # Copyright (c) 2012-2013, Mark Peek # Copyright (c) 2014, Andy Botting # All rights reserved. diff --git a/troposphere/type_defs/compat.py b/troposphere/type_defs/compat.py index efffe66f2..df0e26301 100644 --- a/troposphere/type_defs/compat.py +++ b/troposphere/type_defs/compat.py @@ -1,4 +1,5 @@ """Type definition backward compatibility.""" + # flake8: noqa from __future__ import annotations diff --git a/troposphere/type_defs/protocols.py b/troposphere/type_defs/protocols.py index 0a1135032..da599b4b2 100644 --- a/troposphere/type_defs/protocols.py +++ b/troposphere/type_defs/protocols.py @@ -1,4 +1,5 @@ """Protocols.""" + from __future__ import annotations from typing import Any, Dict diff --git a/troposphere/validators/__init__.py b/troposphere/validators/__init__.py index 646757218..fa42d7309 100644 --- a/troposphere/validators/__init__.py +++ b/troposphere/validators/__init__.py @@ -28,13 +28,11 @@ @overload -def boolean(x: Literal[True, 1, "true", "True"]) -> Literal[True]: - ... +def boolean(x: Literal[True, 1, "true", "True"]) -> Literal[True]: ... @overload -def boolean(x: Literal[False, 0, "false", "False"]) -> Literal[False]: - ... +def boolean(x: Literal[False, 0, "false", "False"]) -> Literal[False]: ... def boolean(x: Any) -> bool: