Skip to content

Commit b6d8873

Browse files
committed
Fix lint errors
1 parent 0600af7 commit b6d8873

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

aplus_client/interfaces.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def none_on_error(*args, exceptions=None, silent=False):
2121
def wrap(*args, **kwargs):
2222
try:
2323
return func(*args, **kwargs)
24-
except exceptions as e:
24+
except exceptions as e: # pylint: disable=catching-non-exception
2525
if not silent:
2626
logger.info("interface %s raised exception %s", func.__name__, e)
2727
return None

feedback/forms.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,9 @@ def get_notify(self):
137137
new_msg = "".join(new_msg.split())
138138
if new_msg == '': # empty message always removes notification
139139
return Feedback.NOTIFY.REMOVE
140-
elif old_msg == '' and new_msg != '': # empty to non-empty sends notification
140+
if old_msg == '' and new_msg != '': # empty to non-empty sends notification
141141
return Feedback.NOTIFY.NORMAL
142-
else:
143-
return Feedback.NOTIFY.NO # editing non-empty message does not change notification status
142+
return Feedback.NOTIFY.NO # editing non-empty message does not change notification status
144143
# FIXME: add support for instance.NOTIFY.IMPORTANT
145144

146145
def save(self): # pylint: disable=arguments-differ

feedback/tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def update_student_tags(self): # pylint: disable=unused-argument
8585
continue
8686
# check if course is still in progress
8787
course_api = client.load_data(course.url)
88-
if course_api == None:
88+
if course_api is None:
8989
logger.warning("Could not load course data for %s.", course)
9090
continue
9191
course_end = datetime.fromisoformat(course_api.get("ending_time"))

0 commit comments

Comments
 (0)