Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
0x43
eBookHub-backend
Commits
c47eecee
Commit
c47eecee
authored
Mar 13, 2019
by
Patrick van der Leer
Browse files
Expanded tox with pylint
parent
f64d0727
Changes
13
Hide whitespace changes
Inline
Side-by-side
eBookHub/api/__init__.py
View file @
c47eecee
from
.auth
import
auth
,
auth_app
,
login_required
__all__
=
(
auth
,
auth_app
,
login_required
"
auth
"
,
"
auth_app
"
,
"
login_required
"
)
eBookHub/database.py
View file @
c47eecee
# 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
"
]
eBookHub/managers/__init__.py
View file @
c47eecee
...
...
@@ -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
"
)
eBookHub/models/__init__.py
View file @
c47eecee
...
...
@@ -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"
]
eBookHub/models/core.py
View file @
c47eecee
# pylint: disable=E1101
from
sqlalchemy
import
UniqueConstraint
from
sqlalchemy.orm
import
validates
...
...
eBookHub/models/factory/__init__.py
View file @
c47eecee
...
...
@@ -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
"
)
eBookHub/models/factory/core.py
View file @
c47eecee
...
...
@@ -79,10 +79,10 @@ class BookFactory(factory.alchemy.SQLAlchemyModelFactory):
__all__
=
(
AuthorFactory
,
BookFactory
,
BookEditionFactory
,
BookSerieFactory
,
GenreFactory
,
PublisherFactory
"
AuthorFactory
"
,
"
BookFactory
"
,
"
BookEditionFactory
"
,
"
BookSerieFactory
"
,
"
GenreFactory
"
,
"
PublisherFactory
"
)
eBookHub/models/factory/faker/providers/__init__.py
View file @
c47eecee
...
...
@@ -2,6 +2,6 @@ from .genre import GenreProvider
from
.language
import
LanguageProvider
__all__
=
(
GenreProvider
,
LanguageProvider
,
"
GenreProvider
"
,
"
LanguageProvider
"
,
)
eBookHub/models/factory/user.py
View file @
c47eecee
...
...
@@ -20,6 +20,6 @@ class UserFactory(factory.alchemy.SQLAlchemyModelFactory):
return
pwd_context
.
hash
(
"{}:{}:{}"
.
format
(
self
.
id
,
self
.
name
,
self
.
email
))
__all__
=
(
UserFactory
)
__all__
=
[
"
UserFactory
"
]
eBookHub/models/user.py
View file @
c47eecee
# pylint: disable=E1101
from
safrs
import
jsonapi_rpc
from
eBookHub.api
import
login_required
...
...
eBookHub/utils.py
View file @
c47eecee
...
...
@@ -23,6 +23,6 @@ def get_test_flag(default=None):
__all__
=
[
languages
,
get_config
"
languages
"
,
"
get_config
"
]
requirements-test.txt
View file @
c47eecee
tox
flake8
coverage
flask_testing
\ No newline at end of file
flask_testing
pylint
\ No newline at end of file
tox.ini
View file @
c47eecee
[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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment