Move flake8 into src

This is an emerging best practice and there is little reason to not
follow it
This commit is contained in:
Ian Cordasco 2016-06-25 10:12:13 -05:00
parent 5c8d767626
commit 1a2c68f5da
No known key found for this signature in database
GPG key ID: 656D3395E4A9791A
32 changed files with 8 additions and 4 deletions

View file

@ -3,10 +3,13 @@
from __future__ import with_statement
import functools
import os
import sys
import setuptools
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'src'))
import flake8 # noqa
try:
@ -66,6 +69,7 @@ setuptools.setup(
maintainer="Ian Cordasco",
maintainer_email="graffatcolmingov@gmail.com",
url="https://gitlab.com/pycqa/flake8",
package_dir={"": "src"},
packages=[
"flake8",
"flake8.api",

View file

@ -71,15 +71,15 @@ def test_fnmatch_returns_the_default_with_empty_default():
def test_filenames_from_a_directory():
"""Verify that filenames_from walks a directory."""
filenames = list(utils.filenames_from('flake8/'))
filenames = list(utils.filenames_from('src/flake8/'))
assert len(filenames) > 2
assert 'flake8/__init__.py' in filenames
assert 'src/flake8/__init__.py' in filenames
def test_filenames_from_a_directory_with_a_predicate():
"""Verify that predicates filter filenames_from."""
filenames = list(utils.filenames_from(
arg='flake8/',
arg='src/flake8/',
predicate=lambda filename: filename == 'flake8/__init__.py',
))
assert len(filenames) > 2

View file

@ -24,7 +24,7 @@ deps =
flake8-docstrings>=0.2.7
flake8-import-order
commands =
flake8
flake8 src/flake8/ tests/ setup.py
[testenv:pylint]
basepython = python3