File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 2727]
2828
2929
30- def main ( args : argparse . Namespace ) -> None :
30+ def linter_cmd_defaults ( python_files : list [ str ]) :
3131 if os .path .exists (".pylintrc" ):
3232 LINTER_TO_CMD ["pylint" ].append ("--rcfile=.pylintrc" )
3333 else :
3434 path = os .path .join (os .environ ["GITHUB_ACTION_PATH" ], ".pylintrc" )
3535 LINTER_TO_CMD ["pylint" ].append (f"--rcfile={ path } " )
3636
37- if not args . python_files :
37+ if not python_files :
3838 print ("No lintable python files. Exiting." )
3939 sys .exit (0 )
4040 else :
41- LINTER_TO_CMD [args .linter ].extend (args .python_files )
41+ LINTER_TO_CMD [args .linter ].extend (python_files )
42+
43+
44+ def main (args : argparse .Namespace ) -> None :
45+ linter_cmd_defaults (args .python_files )
4246
4347 linting_process = subprocess .run (
4448 LINTER_TO_CMD [args .linter ], capture_output = True , check = False
You can’t perform that action at this time.
0 commit comments