Skip to content

Commit 25f471d

Browse files
committed
Tell mypy to ignore our __new__ shenanigans
1 parent b69f526 commit 25f471d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

blackjax/mcmc.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class hmc:
5151
new_kernel = hmc_kernel
5252
init = hmc_init
5353

54-
def __new__(
54+
def __new__( # type: ignore[misc]
5555
cls,
5656
logprob_fn: Callable,
5757
step_size: float,
@@ -92,7 +92,7 @@ class nuts:
9292
new_kernel = nuts_kernel
9393
init = hmc_init
9494

95-
def __new__(
95+
def __new__( # type: ignore[misc]
9696
cls,
9797
logprob_fn: Callable,
9898
step_size: float,
@@ -132,7 +132,7 @@ class rmh:
132132
new_kernel = rmh_kernel
133133
init = rmh_init
134134

135-
def __new__(
135+
def __new__( # type: ignore[misc]
136136
cls,
137137
logprob_fn: Callable,
138138
sigma: Array,

mypy.ini

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[mypy]
2+
show_error_codes = True
23

34
[mypy-jax.*]
45
ignore_missing_imports = True

0 commit comments

Comments
 (0)