Skip to content

Commit 9271cdd

Browse files
committed
black
1 parent 88d663a commit 9271cdd

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

causal_testing/json_front/json_class.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ def _setup_test(
286286
"outcome": causal_test_case.outcome_variable.name,
287287
"df": causal_test_engine.scenario_execution_data_df,
288288
"effect_modifiers": causal_test_case.effect_modifier_configuration,
289-
"alpha": test['alpha'] if 'alpha' in test else 0.05
289+
"alpha": test["alpha"] if "alpha" in test else 0.05,
290290
}
291291
if "formula" in test:
292292
estimator_kwargs["formula"] = test["formula"]

causal_testing/testing/causal_test_outcome.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ def apply(self, res: CausalTestResult) -> bool:
5353
value = res.test_value.value if isinstance(res.ci_high(), Iterable) else [res.test_value.value]
5454

5555
if not all(ci_low < 0 < ci_high for ci_low, ci_high in zip(ci_low, ci_high)):
56-
print("FAILING ON", [(ci_low, ci_high) for ci_low, ci_high in zip(ci_low, ci_high) if not ci_low < 0 < ci_high])
56+
print(
57+
"FAILING ON",
58+
[(ci_low, ci_high) for ci_low, ci_high in zip(ci_low, ci_high) if not ci_low < 0 < ci_high],
59+
)
5760

5861
return all(ci_low < 0 < ci_high for ci_low, ci_high in zip(ci_low, ci_high)) or all(
5962
abs(v) < self.atol for v in value

causal_testing/testing/estimators.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def __init__(
4949
outcome: str,
5050
df: pd.DataFrame = None,
5151
effect_modifiers: dict[str:Any] = None,
52-
alpha: float = 0.05
52+
alpha: float = 0.05,
5353
):
5454
self.treatment = treatment
5555
self.treatment_value = treatment_value
@@ -303,9 +303,11 @@ def __init__(
303303
df: pd.DataFrame = None,
304304
effect_modifiers: dict[Variable:Any] = None,
305305
formula: str = None,
306-
alpha: float = 0.05
306+
alpha: float = 0.05,
307307
):
308-
super().__init__(treatment, treatment_value, control_value, adjustment_set, outcome, df, effect_modifiers, alpha=alpha)
308+
super().__init__(
309+
treatment, treatment_value, control_value, adjustment_set, outcome, df, effect_modifiers, alpha=alpha
310+
)
309311

310312
self.model = None
311313
if effect_modifiers is None:

0 commit comments

Comments
 (0)