mirror of
https://github.com/PyCQA/flake8.git
synced 2026-03-30 02:46:52 +00:00
Merge the pull requests and Florent's changes.
Boy will this history look down right horrible.
This commit is contained in:
commit
cec066a85c
1 changed files with 12 additions and 1 deletions
|
|
@ -1,5 +1,6 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
import re
|
||||
import platform
|
||||
|
||||
import pep8
|
||||
|
||||
|
|
@ -37,7 +38,10 @@ def get_parser():
|
|||
"""
|
||||
(extensions, parser_hooks, options_hooks) = _register_extensions()
|
||||
details = ', '.join(['%s: %s' % ext for ext in extensions])
|
||||
parser = pep8.get_parser('flake8', '%s (%s)' % (__version__, details))
|
||||
python_version = get_python_version()
|
||||
parser = pep8.get_parser('flake8', '%s (%s) %s' % (
|
||||
__version__, details, python_version
|
||||
))
|
||||
for opt in ('--repeat', '--testsuite', '--doctest'):
|
||||
try:
|
||||
parser.remove_option(opt)
|
||||
|
|
@ -78,3 +82,10 @@ def get_style_guide(**kwargs):
|
|||
for options_hook in options_hooks:
|
||||
options_hook(options)
|
||||
return styleguide
|
||||
|
||||
|
||||
def get_python_version():
|
||||
return '%s %s on %s' % (
|
||||
platform.python_implementation(), platform.python_version(),
|
||||
platform.system()
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue