mirror of
https://github.com/PyCQA/flake8.git
synced 2026-03-29 10:36:53 +00:00
Move flake8 into src
This is an emerging best practice and there is little reason to not follow it
This commit is contained in:
parent
5c8d767626
commit
1a2c68f5da
32 changed files with 8 additions and 4 deletions
4
setup.py
4
setup.py
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
2
tox.ini
2
tox.ini
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue