@@ -78,8 +78,7 @@ def test_yaml_and_json_produce_identical_config(tmp_path):
7878def test_yaml_comments_are_ignored (tmp_path ):
7979 """Comments are the whole reason we migrated to YAML — verify they parse cleanly."""
8080 path = tmp_path / "config.yaml"
81- path .write_text (
82- """\
81+ path .write_text ("""\
8382 # Top-level comment
8483contracts:
8584 "0x0000000000000000000000000000000000000001": TransparentUpgradeableProxy # Vault
@@ -96,8 +95,7 @@ def test_yaml_comments_are_ignored(tmp_path):
9695 commit: def456
9796 relative_root: contracts
9897 # version 1.0.0
99- """
100- )
98+ """ )
10199 result = load_config (str (path ))
102100 assert (
103101 result ["contracts" ]["0x0000000000000000000000000000000000000001" ]
@@ -140,8 +138,7 @@ def test_yaml_preserves_hex_address_strings(tmp_path):
140138 """YAML auto-coerces unquoted hex (0x1A -> int 26). Quoted addresses must stay strings."""
141139 path = tmp_path / "config.yaml"
142140 # Write raw YAML with quoted hex addresses to ensure they stay as strings
143- path .write_text (
144- """\
141+ path .write_text ("""\
145142 contracts:
146143 "0x00000000000000000000000000000000000000AB": TestContract
147144 "0x0000000000000000000000000000000000000100": AnotherContract
@@ -153,8 +150,7 @@ def test_yaml_preserves_hex_address_strings(tmp_path):
153150 commit: abc123
154151 relative_root: ""
155152dependencies: {}
156- """
157- )
153+ """ )
158154 result = load_config (str (path ))
159155 addresses = list (result ["contracts" ].keys ())
160156 for addr in addresses :
@@ -171,8 +167,7 @@ def test_yaml_preserves_hex_address_strings(tmp_path):
171167def test_yaml_unquoted_hex_address_raises (tmp_path ):
172168 """Unquoted hex addresses get coerced to int by PyYAML — load_config must catch this."""
173169 path = tmp_path / "config.yaml"
174- path .write_text (
175- """\
170+ path .write_text ("""\
176171 contracts:
177172 0x00000000000000000000000000000000000000AB: TestContract
178173explorer_hostname: api.etherscan.io
@@ -182,8 +177,7 @@ def test_yaml_unquoted_hex_address_raises(tmp_path):
182177 commit: abc123
183178 relative_root: ""
184179dependencies: {}
185- """
186- )
180+ """ )
187181 with pytest .raises (ValueError , match = "parsed as integer" ):
188182 load_config (str (path ))
189183
@@ -199,8 +193,7 @@ def test_empty_yaml_raises(tmp_path):
199193def test_bytecode_comparison_unquoted_hex_raises (tmp_path ):
200194 """Unquoted hex in bytecode_comparison.constructor_args keys should be caught."""
201195 path = tmp_path / "config.yaml"
202- path .write_text (
203- """\
196+ path .write_text ("""\
204197 contracts:
205198 "0x0000000000000000000000000000000000000001": TestContract
206199explorer_hostname: api.etherscan.io
@@ -214,17 +207,15 @@ def test_bytecode_comparison_unquoted_hex_raises(tmp_path):
214207 constructor_args:
215208 0x00000000000000000000000000000000000000AB:
216209 - "0x01"
217- """
218- )
210+ """ )
219211 with pytest .raises (ValueError , match = "bytecode_comparison.constructor_args" ):
220212 load_config (str (path ))
221213
222214
223215def test_bytecode_comparison_library_unquoted_hex_raises (tmp_path ):
224216 """Unquoted hex in bytecode_comparison.libraries values should be caught."""
225217 path = tmp_path / "config.yaml"
226- path .write_text (
227- """\
218+ path .write_text ("""\
228219 contracts:
229220 "0x0000000000000000000000000000000000000001": TestContract
230221explorer_hostname: api.etherscan.io
@@ -238,8 +229,7 @@ def test_bytecode_comparison_library_unquoted_hex_raises(tmp_path):
238229 libraries:
239230 "contracts/Foo.sol":
240231 MyLib: 0x00000000000000000000000000000000000000AB
241- """
242- )
232+ """ )
243233 with pytest .raises (ValueError , match = "bytecode_comparison.libraries" ):
244234 load_config (str (path ))
245235
0 commit comments