Skip to content

Commit

Permalink
Don't flake8 conda/compat.py
Browse files Browse the repository at this point in the history
Because it's a bunch of import shims, flake8 detects a lot of undefined
names and unused imports. Just don't check this file.
  • Loading branch information
alanhdu committed Mar 30, 2016
1 parent a6d66ee commit eaa04cd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions conda/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ def lchmod(path, mode):
range = range
zip = zip
else:
import ConfigParser as configparser # noqa
from cStringIO import StringIO # noqa
import urlparse # noqa
from urllib import quote as urllib_quote # noqa
import ConfigParser as configparser
from cStringIO import StringIO
import urlparse
from urllib import quote as urllib_quote
string_types = basestring,
integer_types = (int, long)
class_types = (type, types.ClassType)
Expand All @@ -54,14 +54,14 @@ def lchmod(path, mode):
# links entirely.
if not os.path.islink(path):
os.chmod(path, mode)
from itertools import izip_longest as zip_longest # noqa
from itertools import izip_longest as zip_longest
from math import log
def log2(x):
return log(x, 2)
def ceil(x):
from math import ceil
return int(ceil(x))
from pipes import quote # noqa
from pipes import quote

# Modified from http://hg.python.org/cpython/file/3.3/Lib/tempfile.py. Don't
# use the 3.4 one. It uses the new weakref.finalize feature.
Expand All @@ -70,7 +70,7 @@ def ceil(x):
import os as _os
from tempfile import mkdtemp
range = xrange
from itertools import izip as zip # noqa
from itertools import izip as zip

class TemporaryDirectory(object):
"""Create and return a temporary directory. This has the same
Expand Down
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ markers =
[pep8]
max-line-length = 99
ignore = E121,E123,E126,E133,E226,E241,E242,E704
exclude = build/*,.tox/*,tests/*,ve/*,*/_vendor/*,conda/auxlib/*,conda/progressbar/*
exclude = build/*,.tox/*,tests/*,ve/*,*/_vendor/*,auxlib/*,conda/progressbar/*,conda/compat.py


[flake8]
max-line-length = 99
ignore = E121,E123,E126,E133,E226,E241,E242,E704
exclude = build/*,.tox/*,tests/*,ve/*,*/_vendor/*,conda/auxlib/*,conda/progressbar/*
exclude = build/*,.tox/*,tests/*,ve/*,*/_vendor/*,auxlib/*,conda/progressbar/*,conda/compat.py


[coverage:run]
omit =
conda/auxlib/*
auxlib/*
conda/progressbar/*

0 comments on commit eaa04cd

Please sign in to comment.