Skip to content

Commit 4140361

Browse files
ArmavicaricardoV94
authored andcommitted
Fix RUF013
1 parent ba56b81 commit 4140361

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

pymc/distributions/shape_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ def get_support_shape(
420420
shape: Optional[Shape] = None,
421421
dims: Optional[Dims] = None,
422422
observed: Optional[Any] = None,
423-
support_shape_offset: Sequence[int] = None,
423+
support_shape_offset: Optional[Sequence[int]] = None,
424424
ndim_supp: int = 1,
425425
) -> Optional[TensorVariable]:
426426
"""Extract the support shapes from shape / dims / observed information

pymc/initial_point.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def make_initial_point_expression(
180180
free_rvs: Sequence[TensorVariable],
181181
rvs_to_transforms: dict[TensorVariable, Transform],
182182
initval_strategies: dict[TensorVariable, Optional[Union[np.ndarray, Variable, str]]],
183-
jitter_rvs: set[TensorVariable] = None,
183+
jitter_rvs: Optional[set[TensorVariable]] = None,
184184
default_strategy: str = "moment",
185185
return_transformed: bool = False,
186186
) -> list[TensorVariable]:

pymc/sampling/forward.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,8 @@ def sample_prior_predictive(
345345
var_names: Optional[Iterable[str]] = None,
346346
random_seed: RandomState = None,
347347
return_inferencedata: bool = True,
348-
idata_kwargs: dict = None,
349-
compile_kwargs: dict = None,
348+
idata_kwargs: Optional[dict] = None,
349+
compile_kwargs: Optional[dict] = None,
350350
) -> Union[InferenceData, dict[str, np.ndarray]]:
351351
"""Generate samples from the prior predictive distribution.
352352
@@ -446,8 +446,8 @@ def sample_posterior_predictive(
446446
return_inferencedata: bool = True,
447447
extend_inferencedata: bool = False,
448448
predictions: bool = False,
449-
idata_kwargs: dict = None,
450-
compile_kwargs: dict = None,
449+
idata_kwargs: Optional[dict] = None,
450+
compile_kwargs: Optional[dict] = None,
451451
) -> Union[InferenceData, dict[str, np.ndarray]]:
452452
"""Generate posterior predictive samples from a model given a trace.
453453
@@ -681,7 +681,7 @@ def sample_posterior_predictive_w(
681681
random_seed: RandomState = None,
682682
progressbar: bool = True,
683683
return_inferencedata: bool = True,
684-
idata_kwargs: dict = None,
684+
idata_kwargs: Optional[dict] = None,
685685
):
686686
"""Generate weighted posterior predictive samples from a list of models and
687687
a list of traces according to a set of weights.

0 commit comments

Comments
 (0)