Skip to content

Commit bb0aeb2

Browse files
committed
Add patch for autopep8
1 parent 0844650 commit bb0aeb2

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
diff --git a/autopep8.py b/autopep8.py
2+
index 792a501..6dc15ca 100644
3+
--- a/autopep8.py
4+
+++ b/autopep8.py
5+
@@ -3905,8 +3905,11 @@ def parse_args(arguments, apply_config=False):
6+
if args.jobs < 1:
7+
# Do not import multiprocessing globally in case it is not supported
8+
# on the platform.
9+
- import multiprocessing
10+
- args.jobs = multiprocessing.cpu_count()
11+
+ if sys.implementation.name == 'graalpy':
12+
+ args.jobs = __graalpython__.get_max_process_count()
13+
+ else:
14+
+ import multiprocessing
15+
+ args.jobs = multiprocessing.cpu_count()
16+
17+
if args.jobs > 1 and not (args.in_place or args.diff):
18+
parser.exit(
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[[rules]]
2+
patch = 'autopep8.patch'

0 commit comments

Comments
 (0)