mirror of
https://github.com/PyCQA/flake8.git
synced 2026-03-30 10:46:54 +00:00
Merge branch 'mp-win' into 'master'
Enable multiprocessing on Windows on unaffected Python versions *Related to:* #135 See merge request !61
This commit is contained in:
commit
7bed004c06
2 changed files with 7 additions and 3 deletions
|
|
@ -59,8 +59,8 @@ class BaseQReport(pep8.BaseReport):
|
|||
def _process_main(self):
|
||||
if not self._loaded:
|
||||
# Windows needs to parse again the configuration
|
||||
from flake8.main import get_style_guide, DEFAULT_CONFIG
|
||||
get_style_guide(parse_argv=True, config_file=DEFAULT_CONFIG)
|
||||
from flake8.main import get_style_guide
|
||||
get_style_guide(parse_argv=True)
|
||||
for filename in iter(self.task_queue.get, 'DONE'):
|
||||
self.input_file(filename)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
import sys
|
||||
|
||||
try:
|
||||
import ast
|
||||
|
|
@ -54,7 +55,10 @@ def warn_when_using_jobs(options):
|
|||
|
||||
|
||||
def force_disable_jobs(styleguide):
|
||||
return is_windows() or is_using_stdin(styleguide.paths)
|
||||
affected_mp_version = (sys.version_info <= (2, 7, 11) or
|
||||
(3, 0) <= sys.version_info < (3, 2))
|
||||
return (is_windows() and affected_mp_version or
|
||||
is_using_stdin(styleguide.paths))
|
||||
|
||||
|
||||
INT_TYPES = ('int', 'count')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue