Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 14, 2024
1 parent aa32213 commit d6ba662
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 1 addition & 3 deletions src/typeguard/_checkers.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,7 @@ def check_union(
"\n".join(f"{key}: {error}" for key, error in errors.items()), " "
)
del errors
raise TypeCheckError(
f"did not match any element in the union:\n{formatted_errors}"
)
raise TypeCheckError(f"did not match any element in the union:\n{formatted_errors}")


def check_uniontype(
Expand Down
1 change: 1 addition & 0 deletions tests/test_checkers.py
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,7 @@ def test_union_fail(self, annotation, value):

def test_union_reference_leak(self):
leaked = True

class Leak:
def __del__(self):
nonlocal leaked
Expand Down

0 comments on commit d6ba662

Please sign in to comment.