@ -140,9 +140,9 @@ def _parse_args():
help = " Count the number of unique maintainers " )
help = " Count the number of unique maintainers " )
count_parser . add_argument (
count_parser . add_argument (
" -o " ,
" -o " ,
" --count-orpha ned " ,
" --count-unmaintai ned " ,
action = " store_true " ,
action = " store_true " ,
help = " Count the number of orpha ned areas " )
help = " Count the number of unmaintai ned areas " )
count_parser . set_defaults ( cmd_fn = Maintainers . _count_cmd )
count_parser . set_defaults ( cmd_fn = Maintainers . _count_cmd )
args = parser . parse_args ( )
args = parser . parse_args ( )
@ -289,22 +289,22 @@ class Maintainers:
def _count_cmd ( self , args ) :
def _count_cmd ( self , args ) :
# 'count' subcommand implementation
# 'count' subcommand implementation
if not ( args . count_areas or args . count_collaborators or args . count_maintainers or args . count_orpha ned ) :
if not ( args . count_areas or args . count_collaborators or args . count_maintainers or args . count_unmaintai ned ) :
# if no specific count is provided, print them all
# if no specific count is provided, print them all
args . count_areas = True
args . count_areas = True
args . count_collaborators = True
args . count_collaborators = True
args . count_maintainers = True
args . count_maintainers = True
args . count_orpha ned = True
args . count_unmaintai ned = True
orpha ned = 0
unmaintai ned = 0
collaborators = set ( )
collaborators = set ( )
maintainers = set ( )
maintainers = set ( )
for area in self . areas . values ( ) :
for area in self . areas . values ( ) :
if area . status == ' maintained ' :
if area . status == ' maintained ' :
maintainers = maintainers . union ( set ( area . maintainers ) )
maintainers = maintainers . union ( set ( area . maintainers ) )
elif area . status == ' orphaned ' :
elif area . status == ' odd fixes ' :
orpha ned + = 1
unmaintai ned + = 1
collaborators = collaborators . union ( set ( area . collaborators ) )
collaborators = collaborators . union ( set ( area . collaborators ) )
if args . count_areas :
if args . count_areas :
@ -313,8 +313,8 @@ class Maintainers:
print ( ' {:14} \t {} ' . format ( ' maintainers: ' , len ( maintainers ) ) )
print ( ' {:14} \t {} ' . format ( ' maintainers: ' , len ( maintainers ) ) )
if args . count_collaborators :
if args . count_collaborators :
print ( ' {:14} \t {} ' . format ( ' collaborators: ' , len ( collaborators ) ) )
print ( ' {:14} \t {} ' . format ( ' collaborators: ' , len ( collaborators ) ) )
if args . count_orpha ned :
if args . count_unmaintai ned :
print ( ' {:14} \t {} ' . format ( ' orphaned: ' , orpha ned) )
print ( ' {:14} \t {} ' . format ( ' unmaintained: ' , unmaintai ned) )
def _list_cmd ( self , args ) :
def _list_cmd ( self , args ) :
# 'list' subcommand implementation
# 'list' subcommand implementation
@ -481,7 +481,7 @@ def _check_maintainers(maints_path, yaml):
" files-exclude " , " files-regex " , " files-regex-exclude " ,
" files-exclude " , " files-regex " , " files-regex-exclude " ,
" labels " , " description " }
" labels " , " description " }
ok_status = { " maintained " , " odd fixes " , " orpha ned" , " obsolete " }
ok_status = { " maintained " , " odd fixes " , " unmaintai ned" , " obsolete " }
ok_status_s = " , " . join ( ' " ' + s + ' " ' for s in ok_status ) # For messages
ok_status_s = " , " . join ( ' " ' + s + ' " ' for s in ok_status ) # For messages
for area_name , area_dict in yaml . items ( ) :
for area_name , area_dict in yaml . items ( ) :