Skip to content

Commit bd64d0e

Browse files
committed
Pylint
1 parent da471f7 commit bd64d0e

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

causal_testing/specification/metamorphic_relation.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
from abc import abstractmethod
88
from typing import Iterable
99
from itertools import combinations
10-
import numpy as np
11-
import pandas as pd
12-
import networkx as nx
1310
import argparse
1411
import logging
1512
import json
13+
import networkx as nx
14+
import pandas as pd
15+
import numpy as np
1616

1717
from causal_testing.specification.causal_specification import CausalDAG, Node
1818
from causal_testing.data_collection.data_collector import ExperimentalDataCollector
@@ -270,14 +270,14 @@ def generate_metamorphic_relations(dag: CausalDAG) -> list[MetamorphicRelation]:
270270
)
271271
args = parser.parse_args()
272272

273-
dag = CausalDAG(args.dag_path)
274-
relations = generate_metamorphic_relations(dag)
273+
causal_dag = CausalDAG(args.dag_path)
274+
relations = generate_metamorphic_relations(causal_dag)
275275
tests = [
276276
relation.to_json_stub(skip=False)
277277
for relation in relations
278-
if len(list(dag.graph.predecessors(relation.output_var))) > 0
278+
if len(list(causal_dag.graph.predecessors(relation.output_var))) > 0
279279
]
280280

281281
logger.info(f"Generated {len(tests)} tests. Saving to {args.output_path}.")
282-
with open(args.output_path, "w") as f:
282+
with open(args.output_path, "w", encoding="utf-8") as f:
283283
json.dump({"tests": tests}, f, indent=2)

0 commit comments

Comments
 (0)