Skip to content

Commit

Permalink
Merge pull request #184 from dfunckt/mypy
Browse files Browse the repository at this point in the history
Run mypy as a pre-commit hook
  • Loading branch information
federicobond committed Mar 25, 2024
2 parents 286249a + dd4042d commit 5ed287b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Expand Up @@ -26,6 +26,10 @@ repos:
additional_dependencies:
- flake8-bugbear
- flake8-comprehensions
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.9.0"
hooks:
- id: mypy
- repo: https://github.com/mgedmin/check-manifest
rev: "0.49"
hooks:
Expand Down
4 changes: 2 additions & 2 deletions rules/predicates.py
Expand Up @@ -64,13 +64,13 @@ def __init__(
assert callable(fn), "The given predicate is not callable."
innerfn = fn
if isinstance(fn, Predicate):
fn, num_args, var_args, name = (
innerfn, num_args, var_args, name = (
fn.fn,
fn.num_args,
fn.var_args,
name or fn.name,
)
innerfn = fn
fn = innerfn
elif isinstance(fn, partial):
innerfn = fn.func
argspec = getfullargspec(innerfn)
Expand Down

0 comments on commit 5ed287b

Please sign in to comment.