Skip to content

Commit

Permalink
Always remove dev section from requirements list in info
Browse files Browse the repository at this point in the history
  • Loading branch information
rayzchen committed Jul 27, 2023
1 parent 851e8e4 commit bbbb68c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions pyunity/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,10 @@ def getReqsFromToml(version):
def pruneReqs(reqs):
"""
Prune the requirements dict retrieved by ``getReqsFrom*``
functions. Removes sections with no requirements found,
and removes the ``dev`` section if there are any missing
requirements. This helps reduce the output of ``getInfo``,
since ``[dev]`` is a list of requirements which include
most other sections.
functions. Removes the ``dev`` section if found and
removes sections with no requirements found. This helps
reduce the output of ``getInfo``, since ``[dev]`` is a
list of requirements which include most other sections.
Parameters
----------
Expand All @@ -178,7 +177,7 @@ def pruneReqs(reqs):
if all(x[1] is None for x in reqs[section]):
removed.add(section)

if "dev" in reqs and any(x[1] is None for x in reqs[section]):
if "dev" in reqs:
removed.add("dev")

for section in removed:
Expand Down

0 comments on commit bbbb68c

Please sign in to comment.