Skip to content

Commit

Permalink
Update Flake8 Checks
Browse files Browse the repository at this point in the history
This patch fixes a few complaints of newer flake8 versions.
  • Loading branch information
lkiesow committed Aug 14, 2023
1 parent 5cc5744 commit 92f9bb3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyca/capture.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from pyca.utils import set_service_status, set_service_status_immediate
from pyca.utils import recording_state, update_event_status
from pyca.config import config
from pyca.db import get_session, RecordedEvent, UpcomingEvent, Status,\
from pyca.db import get_session, RecordedEvent, UpcomingEvent, Status, \
Service, ServiceStatus, with_session
import glob
import logging
Expand Down
2 changes: 1 addition & 1 deletion pyca/ui/jsonapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def schedule_event():
return make_error_response('Invalid data', 400)

# Check duration
if type(data['duration']) != int:
if type(data['duration']) is not int:
return make_error_response('Duration must be an integer', 400)
except Exception as e:
logger.debug('bad request', e)
Expand Down
2 changes: 1 addition & 1 deletion pyca/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def service(service_name, force_update=False):

def ensurelist(x):
'''Ensure an element is a list.'''
return x if type(x) == list else [x]
return x if type(x) is list else [x]


def register_ca(status='idle'):
Expand Down

0 comments on commit 92f9bb3

Please sign in to comment.