diff --git a/flake8/engine.py b/flake8/engine.py index dd142a3..12993cf 100644 --- a/flake8/engine.py +++ b/flake8/engine.py @@ -6,7 +6,7 @@ import pep8 from flake8 import __version__ from flake8.reporter import multiprocessing, BaseQReport, QueueReport -from flake8.util import OrderedSet +from flake8.util import OrderedSet, is_windows _flake8_noqa = re.compile(r'flake8[:=]\s*noqa', re.I).search @@ -49,7 +49,7 @@ def get_parser(): except ValueError: pass - if multiprocessing: + if multiprocessing and not is_windows(): try: auto = multiprocessing.cpu_count() or 1 except NotImplementedError: diff --git a/flake8/util.py b/flake8/util.py index 4455543..5ace309 100644 --- a/flake8/util.py +++ b/flake8/util.py @@ -1,4 +1,5 @@ # -*- coding: utf-8 -*- +import os try: import ast @@ -43,6 +44,11 @@ def is_flag(val): return val.upper() in ('1', '0', 'F', 'T', 'TRUE', 'FALSE', 'ON', 'OFF') +def is_windows(): + """Determine if the system is Windows.""" + return os.name == 'nt' + + def flag_on(val): """Return true if flag is on""" return str(val).upper() in ('1', 'T', 'TRUE', 'ON')