Skip to content

Commit 17b8692

Browse files
Pylint suggestions
1 parent 123d4db commit 17b8692

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

causal_testing/testing/causal_test_outcome.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def apply(self, res: CausalTestResult) -> bool:
3131
if res.test_value.type == "risk_ratio":
3232
return any(
3333
1 < ci_low < ci_high or ci_low < ci_high < 1 for ci_low, ci_high in zip(res.ci_low(), res.ci_high()))
34-
if res.test_value.type == "coefficient" or res.test_value.type == "ate":
34+
if res.test_value.type in ('coefficient', 'ate'):
3535
return any(
3636
0 < ci_low < ci_high or ci_low < ci_high < 0 for ci_low, ci_high in zip(res.ci_low(), res.ci_high()))
3737

@@ -54,7 +54,7 @@ def apply(self, res: CausalTestResult) -> bool:
5454
if res.test_value.type == "risk_ratio":
5555
return any(ci_low < 1 < ci_high or np.isclose(value, 1.0, atol=self.atol) for ci_low, ci_high, value in
5656
zip(res.ci_low(), res.ci_high(), res.test_value.value))
57-
elif res.test_value.type == "coefficient" or res.test_value.type == "ate":
57+
if res.test_value.type in ('coefficient', 'ate'):
5858
value = res.test_value.value if isinstance(res.ci_high(), Iterable) else [res.test_value.value]
5959
return (
6060
sum(

0 commit comments

Comments
 (0)