Add overall python code QA and guidelines with flake8

ScyllaDB loves python & python loves ScyllaDB.

It would benefit the project to start enforcing some code guidelines
and basic QA with a linter along a PEP8 respect thanks to flake8.

This patch adds a tox config to at least start with an assessment
of the work to be done on all .py files in the code base.

To reduce its noise, tests on long lines (> 80char) are ignored
for now.

Signed-off-by: Ultrabug <ultrabug@gentoo.org>
Message-Id: <20170726134242.8927-1-ultrabug@gentoo.org>
This commit is contained in:
Ultrabug
2017-07-26 15:42:42 +02:00
committed by Avi Kivity
parent dddbd34b52
commit 2022da2405
3 changed files with 36 additions and 0 deletions

4
.gitignore vendored
View File

@@ -13,4 +13,8 @@ Cql.tokens
.kdev4
*.kdev4
CMakeLists.txt.user
.cache
.tox
*.egg-info
__pycache__CMakeLists.txt.user
.gdbinit

12
setup.py Normal file
View File

@@ -0,0 +1,12 @@
from setuptools import find_packages, setup
setup(
name="scylla",
description='NoSQL data store using the seastar framework, compatible with Apache Cassandra',
url='https://github.com/scylladb/scylla',
download_url='https://github.com/scylladb/scylla/tags',
license='AGPL',
platforms='any',
packages=find_packages(),
include_package_data=True,
install_requires=[])

20
tox.ini Normal file
View File

@@ -0,0 +1,20 @@
[tox]
usedevelop=True
skipdist=True
[testenv]
deps =
pytest
pytest-flake8
commands =
pytest --flake8 -k 'not tests'
[flake8]
max-line-length = 120
exclude = .ropeproject,.tox,tests
show-source = False
[pytest]
flake8-ignore =
E501