@@ -184,16 +184,16 @@ class TestReadCfg:
184184 @pytest .mark .parametrize (
185185 "config_files_manager" , defaults .CONFIG_FILES , indirect = True
186186 )
187- def test_load_conf (_ , config_files_manager ):
187+ def test_load_conf (self , config_files_manager ):
188188 cfg = config .read_cfg ()
189189 assert cfg .settings == _settings
190190
191- def test_conf_returns_default_when_no_files (_ , tmpdir ):
191+ def test_conf_returns_default_when_no_files (self , tmpdir ):
192192 with tmpdir .as_cwd ():
193193 cfg = config .read_cfg ()
194194 assert cfg .settings == defaults .DEFAULT_SETTINGS
195195
196- def test_load_empty_pyproject_toml_and_cz_toml_with_config (_ , tmpdir ):
196+ def test_load_empty_pyproject_toml_and_cz_toml_with_config (self , tmpdir ):
197197 with tmpdir .as_cwd ():
198198 p = tmpdir .join ("pyproject.toml" )
199199 p .write ("" )
@@ -203,15 +203,15 @@ def test_load_empty_pyproject_toml_and_cz_toml_with_config(_, tmpdir):
203203 cfg = config .read_cfg ()
204204 assert cfg .settings == _settings
205205
206- def test_load_pyproject_toml_from_config_argument (_ , tmpdir ):
206+ def test_load_pyproject_toml_from_config_argument (self , tmpdir ):
207207 with tmpdir .as_cwd ():
208208 _not_root_path = tmpdir .mkdir ("not_in_root" ).join ("pyproject.toml" )
209209 _not_root_path .write (PYPROJECT )
210210
211211 cfg = config .read_cfg (filepath = "./not_in_root/pyproject.toml" )
212212 assert cfg .settings == _settings
213213
214- def test_load_cz_json_not_from_config_argument (_ , tmpdir ):
214+ def test_load_cz_json_not_from_config_argument (self , tmpdir ):
215215 with tmpdir .as_cwd ():
216216 _not_root_path = tmpdir .mkdir ("not_in_root" ).join (".cz.json" )
217217 _not_root_path .write (JSON_STR )
@@ -220,7 +220,7 @@ def test_load_cz_json_not_from_config_argument(_, tmpdir):
220220 json_cfg_by_class = JsonConfig (data = JSON_STR , path = _not_root_path )
221221 assert cfg .settings == json_cfg_by_class .settings
222222
223- def test_load_cz_yaml_not_from_config_argument (_ , tmpdir ):
223+ def test_load_cz_yaml_not_from_config_argument (self , tmpdir ):
224224 with tmpdir .as_cwd ():
225225 _not_root_path = tmpdir .mkdir ("not_in_root" ).join (".cz.yaml" )
226226 _not_root_path .write (YAML_STR )
@@ -229,7 +229,7 @@ def test_load_cz_yaml_not_from_config_argument(_, tmpdir):
229229 yaml_cfg_by_class = YAMLConfig (data = YAML_STR , path = _not_root_path )
230230 assert cfg .settings == yaml_cfg_by_class ._settings
231231
232- def test_load_empty_pyproject_toml_from_config_argument (_ , tmpdir ):
232+ def test_load_empty_pyproject_toml_from_config_argument (self , tmpdir ):
233233 with tmpdir .as_cwd ():
234234 _not_root_path = tmpdir .mkdir ("not_in_root" ).join ("pyproject.toml" )
235235 _not_root_path .write ("" )
@@ -260,7 +260,7 @@ class TestWarnMultipleConfigFiles:
260260 ],
261261 )
262262 def test_warn_multiple_config_files_same_dir (
263- _ , tmpdir , capsys , files , expected_path , should_warn
263+ self , tmpdir , capsys , files , expected_path , should_warn
264264 ):
265265 """Test warning when multiple config files exist in same directory."""
266266 with tmpdir .as_cwd ():
@@ -296,7 +296,7 @@ def test_warn_multiple_config_files_same_dir(
296296 ],
297297 )
298298 def test_warn_same_filename_different_directories_with_git (
299- _ , tmpdir , capsys , config_file , content
299+ self , tmpdir , capsys , config_file , content
300300 ):
301301 """Test warning when same config filename exists in the current directory and in the git root."""
302302 with tmpdir .as_cwd ():
@@ -317,7 +317,7 @@ def test_warn_same_filename_different_directories_with_git(
317317 assert f"Using config file: '{ config_file } '" in captured .err
318318 assert cfg .path == Path (config_file )
319319
320- def test_no_warn_with_explicit_config_path (_ , tmpdir , capsys ):
320+ def test_no_warn_with_explicit_config_path (self , tmpdir , capsys ):
321321 """Test that no warning is issued when user explicitly specifies config."""
322322 with tmpdir .as_cwd ():
323323 # Create multiple config files
@@ -352,7 +352,7 @@ def test_no_warn_with_explicit_config_path(_, tmpdir, capsys):
352352 ],
353353 )
354354 def test_no_warn_with_single_config_file (
355- _ , tmpdir , capsys , config_file , content , with_git
355+ self , tmpdir , capsys , config_file , content , with_git
356356 ):
357357 """Test that no warning is issued when user explicitly specifies config."""
358358 with tmpdir .as_cwd ():
0 commit comments