mirror of
https://github.com/vale981/poetry2nix
synced 2025-03-05 09:11:39 -05:00
refactor(pyproject-without-special-deps.py): use bools instead of ints
This commit is contained in:
parent
9a495722ef
commit
b95fe190ce
1 changed files with 3 additions and 3 deletions
|
@ -16,10 +16,10 @@ def main(input, output, fields_to_remove):
|
|||
else:
|
||||
for dep in deps.values():
|
||||
if isinstance(dep, dict):
|
||||
removed = 0
|
||||
any_removed = False
|
||||
for field in fields_to_remove:
|
||||
removed += dep.pop(field, None) is not None
|
||||
if removed:
|
||||
any_removed |= dep.pop(field, None) is not None
|
||||
if any_removed:
|
||||
dep["version"] = "*"
|
||||
|
||||
json.dump(data, output, separators=(",", ":"))
|
||||
|
|
Loading…
Add table
Reference in a new issue