Skip to content

Commit ef8e141

Browse files
Replace tuple with positional arguments
1 parent 0f1e22f commit ef8e141

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

causal_testing/data_collection/data_collector.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ def filter_valid_data(self, data: pd.DataFrame, check_pos: bool = True) -> pd.Da
7373
size_diff = len(data) - len(satisfying_data)
7474
if size_diff > 0:
7575
logger.warning(
76-
"Discarded %s/%s values due to constraint violations.\n"
77-
"For example%s" % (size_diff, len(data), unsat_core)
76+
"Discarded %s/%s values due to constraint violations.\n"
77+
"For example%s", size_diff, len(data), unsat_core
7878
)
7979
return satisfying_data
8080

causal_testing/specification/causal_dag.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,8 @@ def adjustment_set_is_minimal(self, treatments: list[str], outcomes: list[str],
349349
proper_backdoor_graph, treatments, outcomes, smaller_adjustment_set
350350
):
351351
logger.info(
352-
"Z=%s is not minimal because Z'=Z\\{{'%s'}}="
353-
"%s is also a valid adjustment set." % (adjustment_set, variable, smaller_adjustment_set)
352+
"Z=%s is not minimal because Z'=Z\\{{'%s'}}="
353+
"%s is also a valid adjustment set.", adjustment_set, variable, smaller_adjustment_set
354354
)
355355
return False
356356

@@ -394,15 +394,15 @@ def constructive_backdoor_criterion(
394394
if not set(covariates).issubset(set(self.graph.nodes).difference(descendents_of_proper_casual_paths)):
395395
logger.info(
396396
"Failed Condition 1: Z=%s **is** a descendent of some variable on a proper causal "
397-
"path between X=%s and Y=%s." % (covariates, treatments, outcomes)
397+
"path between X=%s and Y=%s.", covariates, treatments, outcomes
398398
)
399399
return False
400400

401401
# Condition (2)
402402
if not nx.d_separated(proper_backdoor_graph.graph, set(treatments), set(outcomes), set(covariates)):
403403
logger.info(
404404
"Failed Condition 2: Z=%s **does not** d-separate X=%s and Y=%s in"
405-
" the proper back-door graph relative to X and Y.", {covariates, treatments, outcomes}
405+
" the proper back-door graph relative to X and Y.", covariates, treatments, outcomes
406406
)
407407
return False
408408

0 commit comments

Comments
 (0)