mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-12 15:44:17 +00:00
Unused import
This commit is contained in:
parent
064f986d9a
commit
4f57016809
1 changed files with 1 additions and 8 deletions
|
|
@ -3,18 +3,10 @@ import re
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from io import StringIO
|
from io import StringIO
|
||||||
import optparse
|
|
||||||
import pep8
|
import pep8
|
||||||
import pyflakes
|
import pyflakes
|
||||||
from pyflakes import reporter, messages
|
from pyflakes import reporter, messages
|
||||||
|
|
||||||
try:
|
|
||||||
# Python 2
|
|
||||||
from ConfigParser import ConfigParser
|
|
||||||
except ImportError:
|
|
||||||
# Python 3
|
|
||||||
from configparser import ConfigParser
|
|
||||||
|
|
||||||
pep8style = None
|
pep8style = None
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -134,6 +126,7 @@ error_mapping = {
|
||||||
class Flake8Reporter(reporter.Reporter):
|
class Flake8Reporter(reporter.Reporter):
|
||||||
"""Our own instance of a Reporter so that we can silence some messages."""
|
"""Our own instance of a Reporter so that we can silence some messages."""
|
||||||
class_mapping = dict((k, c) for (c, v) in error_mapping.items() for k in v)
|
class_mapping = dict((k, c) for (c, v) in error_mapping.items() for k in v)
|
||||||
|
|
||||||
def __init__(self, ignore=None):
|
def __init__(self, ignore=None):
|
||||||
super(Flake8Reporter, self).__init__(sys.stdout, sys.stderr)
|
super(Flake8Reporter, self).__init__(sys.stdout, sys.stderr)
|
||||||
self.ignore = ignore or []
|
self.ignore = ignore or []
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue