Skip to content

Commit f445c91

Browse files
Don't report null removals
1 parent f05cb03 commit f445c91

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/usethis/_tool.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,12 +173,13 @@ def remove_pyproject_configs(self) -> None:
173173
first_removal = True
174174
for keys in keys_to_remove:
175175
try:
176-
if first_removal:
177-
tick_print(f"Removing {self.name} config from 'pyproject.toml'.")
178-
first_removal = False
179176
remove_config_value(keys)
180177
except PyProjectTOMLValueMissingError:
181178
pass
179+
else:
180+
if first_removal:
181+
tick_print(f"Removing {self.name} config from 'pyproject.toml'.")
182+
first_removal = False
182183

183184

184185
class CoverageTool(Tool):

0 commit comments

Comments
 (0)