Skip to content

Commit 267d7c7

Browse files
committed
add type hinting and docstring to the new internal function print_row
1 parent 8279079 commit 267d7c7

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

causalpy/pymc_experiments.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,10 @@ def print_coefficients(self, round_to=None) -> None:
111111
sigma 0.08, 94% HDI [0.07, 0.1]
112112
"""
113113

114-
def print_row(max_label_length, name, coeff_samples, round_to):
114+
def print_row(
115+
max_label_length: int, name: str, coeff_samples: xr.DataArray, round_to: int
116+
) -> None:
117+
"""Print one row of the coefficient table"""
115118
formatted_name = f" {name: <{max_label_length}}"
116119
formatted_val = f"{round_num(coeff_samples.mean().data, round_to)}, 94% HDI [{round_num(coeff_samples.quantile(0.03).data, round_to)}, {round_num(coeff_samples.quantile(1-0.03).data, round_to)}]" # noqa: E501
117120
print(f" {formatted_name} {formatted_val}")

docs/source/_static/interrogate_badge.svg

Lines changed: 3 additions & 3 deletions
Loading

0 commit comments

Comments
 (0)