Browse Source

Pylint: use -j 0 arg

"-j 0" runs on the number of CPUs available, just
pass that instead of counting CPUs ourselves.

(This removes a stealthy python2 dependency, too.)

Change-Id: Ia058036ce8bd22be3b93a6fb71c66cb1b5e5f394
changes/12/681512/1
Eric Harney 1 week ago
parent
commit
523c5aaa3a
1 changed files with 2 additions and 3 deletions
  1. 2
    3
      tools/coding-checks.sh

+ 2
- 3
tools/coding-checks.sh View File

@@ -28,7 +28,6 @@ process_options() {
28 28
 run_pylint() {
29 29
 
30 30
     local target="${scriptargs:-HEAD~1}"
31
-    local concurrency=$(python -c 'import multiprocessing as mp; print(mp.cpu_count())')
32 31
     CODE_OKAY=0
33 32
 
34 33
     if [[ "$target" = *"all"* ]]; then
@@ -46,14 +45,14 @@ run_pylint() {
46 45
         echo "Running pylint against manila code modules:"
47 46
         printf "\t%s\n" "${files[@]}"
48 47
         pylint --rcfile=.pylintrc --output-format=colorized ${files} \
49
-            -E -j $concurrency || CODE_OKAY=1
48
+            -E -j 0 || CODE_OKAY=1
50 49
     fi
51 50
     if [[ -n "${test_files}" ]]; then
52 51
         echo "Running pylint against manila test modules:"
53 52
         printf "\t%s\n" "${test_files[@]}"
54 53
         pylint --rcfile=.pylintrc --output-format=colorized ${test_files} \
55 54
             -E -d "no-member,assignment-from-no-return,assignment-from-none" \
56
-            -j $concurrency || CODE_OKAY=1
55
+            -j 0 || CODE_OKAY=1
57 56
     fi
58 57
     exit $CODE_OKAY
59 58
 }

Loading…
Cancel
Save