@@ -27,7 +27,7 @@ def get_installed_distributions() -> list[tuple[str, str]]:
2727 """Return a list of installed Distribution objects."""
2828 try :
2929 return [(d .name , d .version ) for d in meta .distributions ()]
30- except (ImportError , AttributeError , TypeError ):
30+ except (ImportError , AttributeError , TypeError ): # pragma: no cover
3131 return []
3232
3333
@@ -142,10 +142,10 @@ def pytest_report_header(config: pytest.Config) -> str | None:
142142 data .extend (get_version (k ))
143143 ret .append ("\n " .join ([f" { k } : { v } " for k , v in sorted (data )]))
144144
145- if config .option .echo_attribues :
145+ if config .option .echo_attributes :
146146 ret .extend ([
147147 "Inspections:" ,
148- "\n " .join ([f" { k } : { get_module_attribute (k )} " for k in config .option .echo_attribues ]),
148+ "\n " .join ([f" { k } : { get_module_attribute (k )} " for k in config .option .echo_attributes ]),
149149 ])
150150 if not ret :
151151 ret = ["pytest-echo: nothing to echoing" ]
@@ -192,7 +192,7 @@ def pytest_addoption(parser: pytest.Parser) -> None:
192192 group .addoption (
193193 "--echo-attr" ,
194194 action = "append" ,
195- dest = "echo_attribues " ,
195+ dest = "echo_attributes " ,
196196 default = [],
197197 help = "attribute to print (full path)" ,
198198 )
@@ -208,18 +208,16 @@ def pytest_load_initial_conftests(
208208 for entry in _load_values (early_config ):
209209 if entry .type in {"env" , "envs" , "echo_envs" }:
210210 early_config .option .echo_envs .append (entry .key )
211- if entry .type in {"attr" , "attribute" , "echo_attribute " }:
211+ if entry .type in {"attr" , "attribute" , "echo_attributes " }:
212212 early_config .option .echo_attributes .append (entry .key )
213213 if entry .type in {"version" , "echo_version" }:
214214 early_config .option .echo_versions .append (entry .key )
215215
216216
217217def _load_values (early_config : pytest .Config ) -> Iterator [Entry ]:
218- has_toml_conf = False
219- if not has_toml_conf :
220- for var in early_config .getini ("echo_envs" ):
221- yield Entry (var , "env" )
222- for var in early_config .getini ("echo_attributes" ):
223- yield Entry (var , "attr" )
224- for var in early_config .getini ("echo_versions" ):
225- yield Entry (var , "version" )
218+ for var in early_config .getini ("echo_envs" ):
219+ yield Entry (var , "env" )
220+ for var in early_config .getini ("echo_attributes" ):
221+ yield Entry (var , "attr" )
222+ for var in early_config .getini ("echo_versions" ):
223+ yield Entry (var , "version" )
0 commit comments