From 7cd2156cfc23672a1048c376febc979d7f131e4c Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Wed, 25 Jul 2018 21:19:27 +0200 Subject: [PATCH] PyLint happiness (again) --- calsocial/config_testing.py | 2 +- calsocial/forms.py | 7 ++++--- calsocial/models.py | 4 ++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/calsocial/config_testing.py b/calsocial/config_testing.py index 0580273..6f98dcf 100644 --- a/calsocial/config_testing.py +++ b/calsocial/config_testing.py @@ -8,7 +8,7 @@ REGISTRATION_ENABLED = True DEFAULT_TIMEZONE = 'Europe/Budapest' DEBUG = False -TESTING=True +TESTING = True SQLALCHEMY_DATABASE_URI = 'sqlite:///' SQLALCHEMY_TRACK_MODIFICATIONS = False SECRET_KEY = 'WeAreTesting' diff --git a/calsocial/forms.py b/calsocial/forms.py index 4d2ed3a..23150c0 100644 --- a/calsocial/forms.py +++ b/calsocial/forms.py @@ -31,7 +31,7 @@ from wtforms.widgets import TextArea from calsocial.models import EventVisibility, EVENT_VISIBILITY_TRANSLATIONS -class UsernameAvailable(object): # pylint: disable=too-few-public-methods +class UsernameAvailable: # pylint: disable=too-few-public-methods """Checks if a username is available """ @@ -62,7 +62,7 @@ class UsernameAvailable(object): # pylint: disable=too-few-public-methods raise StopValidation(message) -class EmailAvailable(object): # pylint: disable=too-few-public-methods +class EmailAvailable: # pylint: disable=too-few-public-methods """Checks if an email address is available """ @@ -408,5 +408,6 @@ class ProfileForm(FlaskForm): }) FlaskForm.__init__(self, *args, **kwargs) - self.builtin_avatar.choices = [(name, name) for name in current_app.config['BUILTIN_AVATARS']] + self.builtin_avatar.choices = [(name, name) + for name in current_app.config['BUILTIN_AVATARS']] self.profile = profile diff --git a/calsocial/models.py b/calsocial/models.py index 457f611..7442b08 100644 --- a/calsocial/models.py +++ b/calsocial/models.py @@ -101,7 +101,7 @@ class ResponseType(Enum): return self.name.lower() == other.lower() # pylint: disable=no-member if isinstance(other, (int, float)): - return self.value == other + return self.value == other # pylint: disable=comparison-with-callable return Enum.__eq__(self, other) @@ -792,7 +792,7 @@ class Response(db.Model): # pylint: disable=too-few-public-methods response = db.Column(db.Enum(ResponseType), nullable=False) -class AppState(app_state_base(db.Model)): # pylint: disable=too-few-public-methods +class AppState(app_state_base(db.Model)): # pylint: disable=too-few-public-methods,inherit-non-class """Database model for application state values """ -- 2.40.1