Add PyLint as a development dependency

Use `pylint calsocial` to run the static analysis.
This commit is contained in:
2018-07-03 08:33:49 +02:00
parent 5283599da2
commit 531faa1ce7
7 changed files with 464 additions and 9 deletions

View File

@@ -32,8 +32,6 @@ def get_locale():
Selects the best locale based on values sent by the browser.
"""
from flask import request
supported_languages = ['en', 'hu']
if 'l' in request.args and request.args['l'].lower() in supported_languages:
@@ -62,7 +60,7 @@ def route(*args, **kwargs):
``**kwargs`` will be passed verbatim to `Flask.route()`.
"""
def decorator(func):
def decorator(func): # pylint: disable=missing-docstring
setattr(func, 'routing', (args, kwargs))
return func
@@ -176,7 +174,8 @@ class CalendarSocialApp(Flask):
form = RegistrationForm()
if form.validate_on_submit():
# TODO: This might become False later, if we want registrations to be confirmed via E-mail
# TODO: This might become False later, if we want registrations to be confirmed via
# e-mail
user = User(active=True)
form.populate_obj(user)