File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 5454 - name : Checkout
5555 uses : actions/checkout@v4.2.2
5656
57+ - name : Install Python
58+ uses : actions/setup-python@v5
59+ with :
60+ # Since 3.10 is the development version for the project
61+ python-version : ' 3.10'
62+
5763 - name : Install hatch
5864 run : pip install hatch==$HATCH_VERSION
5965
Original file line number Diff line number Diff line change 11import sys
22from pathlib import Path
33
4- DISABLE_TAG = ' # pylint: disable='
4+ DISABLE_TAG = " # pylint: disable="
55
66
77def no_cheat (diff_text : str ) -> str :
8- lines = diff_text .split (' \n ' )
8+ lines = diff_text .split (" \n " )
99 removed : dict [str , int ] = {}
1010 added : dict [str , int ] = {}
1111 for line in lines :
@@ -14,9 +14,9 @@ def no_cheat(diff_text: str) -> str:
1414 idx = line .find (DISABLE_TAG )
1515 if idx < 0 :
1616 continue
17- codes = line [idx + len (DISABLE_TAG ) :].split (',' )
17+ codes = line [idx + len (DISABLE_TAG ) :].split ("," )
1818 for code in codes :
19- code = code .strip ().strip (' \n ' ).strip ('"' ).strip ("'" )
19+ code = code .strip ().strip (" \n " ).strip ('"' ).strip ("'" )
2020 if line .startswith ("-" ):
2121 removed [code ] = removed .get (code , 0 ) + 1
2222 continue
@@ -26,7 +26,7 @@ def no_cheat(diff_text: str) -> str:
2626 count -= removed .get (code , 0 )
2727 if count > 0 :
2828 results .append (f"Do not cheat the linter: found { count } additional { DISABLE_TAG } { code } " )
29- return ' \n ' .join (results )
29+ return " \n " .join (results )
3030
3131
3232if __name__ == "__main__" :
You can’t perform that action at this time.
0 commit comments