Skip to content

Commit

Permalink
Update black and isort
Browse files Browse the repository at this point in the history
  • Loading branch information
markpeek committed Apr 29, 2024
1 parent 65b52ab commit bee4c08
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 3 additions & 6 deletions troposphere/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
1 change: 1 addition & 0 deletions troposphere/openstack/heat.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
strings. For this reason, we duplicate the AWS::AutoScaling::AutoScalingGroup
and change these types.
"""

# Copyright (c) 2012-2013, Mark Peek <mark@peek.org>
# Copyright (c) 2014, Andy Botting <andy.botting@theguardian.com>
# All rights reserved.
Expand Down
1 change: 1 addition & 0 deletions troposphere/type_defs/compat.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Type definition backward compatibility."""

# flake8: noqa
from __future__ import annotations

Expand Down
1 change: 1 addition & 0 deletions troposphere/type_defs/protocols.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Protocols."""

from __future__ import annotations

from typing import Any, Dict
Expand Down
6 changes: 2 additions & 4 deletions troposphere/validators/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit bee4c08

Please sign in to comment.