File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -40,18 +40,22 @@ def main():
4040
4141    # Format markdown 
4242    ranked_issues  =  []
43-     for  (i , issue ) in  zip (range (MAX_ISSUES ), issues ):
44- 
45-         # Don't include the overview card 
43+     # Continuous number generator for the numbered list, starts at 1 
44+     index_generator  =  itertools .count (1 )
45+     for  issue  in  issues :
46+         # Don't include the overview card (skip to next iteration) 
4647        if  issue .number  ==  TOP_ISSUES_CARD_NUMBER :
47-             pass 
48+             continue 
49+ 
50+         # Get numbered list item index from generator 
51+         i  =  next (index_generator )
4852
4953        markdown_bullet_point : str  =  (
5054            f"{ issue .html_url }   "  + 
5155            f"({ issue ._rawData ['reactions' ]['+1' ]}   :thumbsup:)" 
5256        )
5357
54-         markdown_bullet_point  =  f"{ i   +   1 }  . { markdown_bullet_point }  " 
58+         markdown_bullet_point  =  f"{ i }  . { markdown_bullet_point }  " 
5559        ranked_issues .append (markdown_bullet_point )
5660
5761    # edit top issues 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments