Split out inheritance flags formatting
This commit is contained in:
parent
106be174b4
commit
d53fefa640
2 changed files with 18 additions and 12 deletions
|
|
@ -636,3 +636,18 @@ def _list_tasks(options, session):
|
|||
t['sub'] = True
|
||||
|
||||
return tasklist
|
||||
|
||||
|
||||
def format_inheritance_flags(parent):
|
||||
"""Return a human readable string of inheritance flags"""
|
||||
flags = ''
|
||||
for code,expr in (
|
||||
('M', parent['maxdepth'] is not None),
|
||||
('F', parent['pkg_filter']),
|
||||
('I', parent['intransitive']),
|
||||
('N', parent['noconfig']),):
|
||||
if expr:
|
||||
flags += code
|
||||
else:
|
||||
flags += '.'
|
||||
return flags
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue