File tree Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Expand file tree Collapse file tree 1 file changed +10
-6
lines changed Original file line number Diff line number Diff line change 9
9
from sys import exit as exitwith
10
10
from textwrap import dedent
11
11
12
- PROJECT_ROOT = path .dirname (path .realpath (__file__ ))
13
- PYLINT_RCFILE = "{}/ pylintrc". format ( PROJECT_ROOT )
12
+ PROJECT_ROOT = path .dirname (path .dirname ( path . realpath (__file__ ) ))
13
+ PYLINT_RCFILE = f" { PROJECT_ROOT } /scripts/ pylintrc"
14
14
15
15
SGR_INFO = "\033 [1;32m"
16
16
SGR_CLEAR = "\033 [0m"
@@ -61,10 +61,14 @@ def parse_command_line():
61
61
62
62
def main ():
63
63
options = parse_command_line ()
64
- failed_count , total_count = pylint_all_filenames (options .dev_mode , [
65
- path .abspath (path .dirname (__file__ ) + "/../docs" ),
66
- path .abspath (path .dirname (__file__ ) + "/../scripts" ),
67
- path .abspath (path .dirname (__file__ ) + "/../test" )])
64
+
65
+ rootdirs = [
66
+ f"{ PROJECT_ROOT } /docs" ,
67
+ f"{ PROJECT_ROOT } /scripts" ,
68
+ f"{ PROJECT_ROOT } /test" ,
69
+ ]
70
+ (failed_count , total_count ) = pylint_all_filenames (options .dev_mode , rootdirs )
71
+
68
72
if failed_count != 0 :
69
73
exitwith ("pylint failed on {}/{} files." .format (failed_count , total_count ))
70
74
else :
You can’t perform that action at this time.
0 commit comments