Skip to content

Commit

Permalink
Merge branch 'master' into clean-coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
mgedmin committed Nov 9, 2018
2 parents 998c932 + ba391db commit 9e94fb9
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 13 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ env:
- FORCE_TEST_VCS=hg
- FORCE_TEST_VCS=svn
install:
- pip install coverage coveralls mock
- pip install coverage coveralls mock flake8
script:
- SKIP_NO_TESTS=1 coverage run setup.py test -q
- coverage report -m
- python check_manifest.py
- flake8 *.py
after_script:
- coveralls
notifications:
Expand Down
8 changes: 4 additions & 4 deletions check_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -714,8 +714,8 @@ def _get_ignore_from_manifest_lines(lines):
# of sub directories. We could use a regexp, but
# two ignores seems easier.
ignore.append(dirname + os.path.sep + pattern)
ignore.append(dirname + os.path.sep + '*' + os.path.sep +
pattern)
ignore.append(
dirname + os.path.sep + '*' + os.path.sep + pattern)
elif cmd == 'prune':
# rest is considered to be a directory name. It should
# not contain a path separator, as it actually has no
Expand All @@ -732,8 +732,8 @@ def _get_ignore_from_manifest_lines(lines):

def file_matches(filename, patterns):
"""Does this filename match any of the patterns?"""
return any(fnmatch.fnmatch(filename, pat) or
fnmatch.fnmatch(os.path.basename(filename), pat)
return any(fnmatch.fnmatch(filename, pat)
or fnmatch.fnmatch(os.path.basename(filename), pat)
for pat in patterns)


Expand Down
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ addopts = --doctest-modules --ignore=setup.py
python-file-with-version = check_manifest.py

[flake8]
ignore=E241,E501,E261,E126,E127,E128,E302
ignore = E241,E501,E261,E126,E127,E128,E302,W503
# E241: multiple spaces after ','
# E501: line too long
# E261: at least two spaces before inline comment
# E126: continuation line over-indented for hanging indent
# E127: continuation line over-indented for visual indent
# E128: continuation line under-indented for visual indent
# E302: expected 2 blank lines, found 0
# W503: line break before binary operator
11 changes: 5 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/usr/bin/env python
import os, re, ast, email.utils, sys
import ast
import email.utils
import os
import re
import sys
from setuptools import setup

if sys.version_info < (2, 7):
Expand Down Expand Up @@ -38,14 +42,9 @@
'linter'],
classifiers=[
'Development Status :: 4 - Beta',
## 'Development Status :: 5 - Production/Stable', eventually...
'Environment :: Console',
'Intended Audience :: Developers',
'License :: OSI Approved :: GNU General Public License (GPL)'
if licence.startswith('GPL') else
'License :: OSI Approved :: MIT License'
if licence.startswith('MIT') else
'License :: uhh, dunno', # fail PyPI upload intentionally until fixed
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
Expand Down
8 changes: 7 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
py27,py34,py35,py36,py37,pypy,pypy3
py27,py34,py35,py36,py37,pypy,pypy3,flake8

[testenv]
passenv = LANG LC_CTYPE LC_ALL MSYSTEM
Expand All @@ -27,3 +27,9 @@ commands =
commands =
python --version
nosetests {posargs}


[testenv:flake8]
skip_install = true
deps = flake8
commands = flake8 *.py

0 comments on commit 9e94fb9

Please sign in to comment.