Commit c47eecee authored by Patrick van der Leer's avatar Patrick van der Leer
Browse files

Expanded tox with pylint

parent f64d0727
from .auth import auth, auth_app, login_required
__all__ = (
auth,
auth_app,
login_required
"auth",
"auth_app",
"login_required"
)
# pylint: disable=E1101
from inspect import isfunction, ismethod
from datetime import datetime as dt
......@@ -134,6 +136,6 @@ class Model(SAFRSBase, db.Model, PrettyPrint):
__all__ = [
db,
Model
"db",
"Model"
]
......@@ -3,7 +3,7 @@ from .parser import parser_manager
from .users import user_manager
__all__ = (
database_manager,
parser_manager,
user_manager
"database_manager",
"parser_manager",
"user_manager"
)
......@@ -2,12 +2,11 @@ from .core import Author, Book, BookEdition, BookSerie, Genre, Publisher
from .user import User
__all__ = [
Author,
Book,
BookEdition,
BookSerie,
Genre,
Publisher,
User
"Author",
"Book",
"BookEdition",
"BookSerie",
"Genre",
"Publisher",
"User"
]
# pylint: disable=E1101
from sqlalchemy import UniqueConstraint
from sqlalchemy.orm import validates
......
......@@ -2,11 +2,11 @@ from .core import AuthorFactory, BookFactory, BookEditionFactory, BookSerieFacto
from .user import UserFactory
__all__ = (
AuthorFactory,
BookFactory,
BookEditionFactory,
BookSerieFactory,
GenreFactory,
PublisherFactory,
UserFactory
"AuthorFactory",
"BookFactory",
"BookEditionFactory",
"BookSerieFactory",
"GenreFactory",
"PublisherFactory",
"UserFactory"
)
......@@ -79,10 +79,10 @@ class BookFactory(factory.alchemy.SQLAlchemyModelFactory):
__all__ = (
AuthorFactory,
BookFactory,
BookEditionFactory,
BookSerieFactory,
GenreFactory,
PublisherFactory
"AuthorFactory",
"BookFactory",
"BookEditionFactory",
"BookSerieFactory",
"GenreFactory",
"PublisherFactory"
)
......@@ -2,6 +2,6 @@ from .genre import GenreProvider
from .language import LanguageProvider
__all__ = (
GenreProvider,
LanguageProvider,
"GenreProvider",
"LanguageProvider",
)
......@@ -20,6 +20,6 @@ class UserFactory(factory.alchemy.SQLAlchemyModelFactory):
return pwd_context.hash("{}:{}:{}".format(self.id, self.name, self.email))
__all__ = (
UserFactory
)
__all__ = [
"UserFactory"
]
# pylint: disable=E1101
from safrs import jsonapi_rpc
from eBookHub.api import login_required
......
......@@ -23,6 +23,6 @@ def get_test_flag(default=None):
__all__ = [
languages,
get_config
"languages",
"get_config"
]
tox
flake8
coverage
flask_testing
\ No newline at end of file
flask_testing
pylint
\ No newline at end of file
[tox]
envlist = py35,py36,coverage
envlist = py35,py36,coverage,pylint
skip_missing_interpreters = true
[testenv]
deps =
......@@ -8,6 +9,15 @@ deps =
-rrequirements-test.txt
commands = unit2 discover []
[testenv:pylint]
basepython = python3
skip_install = true
deps =
pylint
commands =
pylint --rcfile=tox.ini eBookHub
[testenv:coverage]
commands=
coverage run -m unittest2 discover []
......@@ -23,4 +33,26 @@ exclude =
# H233: Python 3.x incompatible use of print operator
ignore =
H101
H233
\ No newline at end of file
H233
[MESSAGES CONTROL]
; C0111 Missing docstring
; I0011: Locally disabling %s
; I0012: Locally enabling %s
; W0704 Except doesn't do anything Used when an except clause does nothing but "pass" and there is no "else" clause
; W0142 Used * or * magic* Used when a function or method is called using *args or **kwargs to dispatch arguments.
; W0212 Access to a protected member %s of a client class
; W0232 Class has no __init__ method Used when a class has no __init__ method, neither its parent classes.
; W0613 Unused argument %r Used when a function or method argument is not used.
; W0702 No exception's type specified Used when an except clause doesn't specify exceptions type to catch.
; R0201 Method could be a function
; W0613 Unused argument (unused-argument)
; W0614 Unused import XYZ from wildcard import
; R0903 Too few public methods
; R0904 Too many public methods
; R0914 Too many local variables
; R0912 Too many branches
; R0915 Too many statements
; R0913 Too many arguments
; R0923: Interface not implemented
disable=I0011,I0012,C0111,W0613,W0142,R
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment