Skip to content

Commit

Permalink
Switched from black to ruff-format
Browse files Browse the repository at this point in the history
  • Loading branch information
agronholm committed May 26, 2024
1 parent 241d120 commit 001977e
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
7 changes: 1 addition & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,7 @@ repos:
hooks:
- id: ruff
args: [--fix, --show-fixes]

- repo: https://github.com/psf/black
rev: 24.3.0
hooks:
- id: black
exclude: "^tests/mypy/negative.py"
- id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
Expand Down
3 changes: 2 additions & 1 deletion src/typeguard/_checkers.py
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,8 @@ def builtin_checker_lookup(
elif is_typeddict(origin_type):
return check_typed_dict
elif isclass(origin_type) and issubclass(
origin_type, Tuple # type: ignore[arg-type]
origin_type,
Tuple, # type: ignore[arg-type]
):
# NamedTuple
return check_tuple
Expand Down
2 changes: 1 addition & 1 deletion src/typeguard/_pytest_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def pytest_addoption(parser: Parser) -> None:
def add_ini_option(
opt_type: (
Literal["string", "paths", "pathlist", "args", "linelist", "bool"] | None
)
),
) -> None:
parser.addini(
group.options[-1].names()[0][2:],
Expand Down
2 changes: 1 addition & 1 deletion src/typeguard/_suppression.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def suppress_type_checks() -> ContextManager[None]: ...


def suppress_type_checks(
func: Callable[P, T] | None = None
func: Callable[P, T] | None = None,
) -> Callable[P, T] | ContextManager[None]:
"""
Temporarily suppress all type checking.
Expand Down

0 comments on commit 001977e

Please sign in to comment.