Skip to content

Commit 9af2437

Browse files
committed
black
1 parent 913ec57 commit 9af2437

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

causal_testing/data_collection/data_collector.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,13 @@ def filter_valid_data(self, data: pd.DataFrame, check_pos: bool = True) -> pd.Da
4040
# Check positivity
4141
scenario_variables = set(self.scenario.variables) - {x.name for x in self.scenario.hidden_variables()}
4242

43-
if check_pos and not (scenario_variables - {x.name for x in self.scenario.hidden_variables()}).issubset(set(data.columns)):
43+
if check_pos and not (scenario_variables - {x.name for x in self.scenario.hidden_variables()}).issubset(
44+
set(data.columns)
45+
):
4446
missing_variables = scenario_variables - set(data.columns)
45-
raise IndexError(f"Missing columns: missing data for variables {missing_variables}. Should they be marked as hidden?")
47+
raise IndexError(
48+
f"Missing columns: missing data for variables {missing_variables}. Should they be marked as hidden?"
49+
)
4650

4751
# For each row, does it satisfy the constraints?
4852
solver = z3.Solver()

causal_testing/specification/variable.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class Variable(ABC):
6767
datatype: T
6868
distribution: rv_generic
6969

70-
def __init__(self, name: str, datatype: T, distribution: rv_generic = None, hidden: bool = False):
70+
def __init__(self, name: str, datatype: T, distribution: rv_generic = None, hidden: bool = False):
7171
self.name = name
7272
self.datatype = datatype
7373
self.z3 = z3_types(datatype)(name)

0 commit comments

Comments
 (0)