Skip to content

Commit 92edfe2

Browse files
codacy
1 parent bbd2dd9 commit 92edfe2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

causal_testing/json_front/json_class.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def set_variables(self, inputs: dict, outputs: dict, metas: dict, distributions:
7777
inputs]
7878
self.outputs = [Output(i['name'], i['type']) for i in outputs]
7979
self.metas = [Meta(i['name'], i['type'], populates[i['populate']]) for i in
80-
metas] if metas else list()
80+
metas] if metas else []
8181

8282
def setup(self):
8383
""" Function to populate all the necessary parts of the json_class needed to execute tests
@@ -134,7 +134,7 @@ def _json_parse(self):
134134
:param distributions: dictionary of user defined scipy distributions
135135
:param populates: dictionary of user defined populate functions
136136
"""
137-
with open(self.json_path) as f:
137+
with open(self.json_path, encoding='UTF-8') as f:
138138
self.test_plan = json.load(f)
139139

140140
self.data = pd.read_csv(self.data_path)

examples/poisson/run_causal_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def populate_num_shapes_unit(data):
138138
# Create input structure required to create a modelling scenario
139139
modelling_inputs = [Input(i['name'], i['type'], distributions[i['distribution']]) for i in inputs] + \
140140
[Output(i['name'], i['type']) for i in outputs] + \
141-
[Meta(i['name'], i['type'], populates[i['populate']]) for i in metas] if metas else list()
141+
[Meta(i['name'], i['type'], populates[i['populate']]) for i in metas] if metas else []
142142

143143
# Create modelling scenario to access z3 variable mirrors
144144
modelling_scenario = Scenario(modelling_inputs, None)

0 commit comments

Comments
 (0)