3333if NOISSUE_MARKER in message :
3434 sys .exit ("Do not add '[noissue]' in the commit message." )
3535
36- if any (( re .match (pattern , message ) for pattern in BLOCKING_REGEX ) ):
36+ if any (re .match (pattern , message ) for pattern in BLOCKING_REGEX ):
3737 sys .exit ("This PR is not ready for consumption." )
3838
3939g = Github (os .environ .get ("GITHUB_TOKEN" ))
4040repo = g .get_repo ("pulp/pulp-cli-maven" )
4141
4242
43- def check_status (issue ) :
43+ def check_status (issue : str ) -> None :
4444 gi = repo .get_issue (int (issue ))
4545 if gi .pull_request :
4646 sys .exit (f"Error: issue #{ issue } is a pull request." )
4747 if gi .closed_at :
4848 sys .exit (f"Error: issue #{ issue } is closed." )
4949
5050
51- def check_changelog (issue ) :
51+ def check_changelog (issue : str ) -> None :
5252 matches = list (Path ("CHANGES" ).rglob (f"{ issue } .*" ))
5353
5454 if len (matches ) < 1 :
@@ -58,7 +58,7 @@ def check_changelog(issue):
5858 sys .exit (f"Invalid extension for changelog entry '{ match } '." )
5959
6060
61- print ("Checking commit message for {sha}." . format ( sha = sha [0 :7 ]) )
61+ print (f "Checking commit message for { sha [0 :7 ]} ." )
6262
6363# validate the issue attached to the commit
6464issue_regex = r"(?:{keywords})[\s:]+#(\d+)" .format (keywords = ("|" ).join (KEYWORDS ))
@@ -72,4 +72,4 @@ def check_changelog(issue):
7272 check_status (issue )
7373 check_changelog (issue )
7474
75- print ("Commit message for {sha} passed." . format ( sha = sha [0 :7 ]) )
75+ print (f "Commit message for { sha [0 :7 ]} passed." )
0 commit comments