Skip to content

Commit

Permalink
Merge pull request #498 from UrLab/dependabot/pip/flake8-7.0.0
Browse files Browse the repository at this point in the history
Bump flake8 from 4.0.1 to 7.0.0
  • Loading branch information
altf4arnold authored Apr 5, 2024
2 parents 01bdb79 + 44a7a4f commit fafbab4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
pip install -r requirements.txt -r requirements-dev.txt
- name: Lint python code
run: flake8 --ignore=E501,F401,E402,F811,E731,F403 .
run: flake8 --ignore=E501,F401,E402,F811,E731,F403,E721 .

- name: Run django checks
run: ./manage.py check
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
pip install -r requirements.txt -r requirements-dev.txt
- name: Lint python code
run: flake8 --ignore=E501,F401,E402,F811,E731,F403 .
run: flake8 --ignore=E501,F401,E402,F811,E731,F403,E721 .

- name: Run django checks
run: ./manage.py check
Expand Down
17 changes: 9 additions & 8 deletions realtime/crossbarconnect.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

try:
import ssl

_HAS_SSL = True
except ImportError:
_HAS_SSL = False
Expand Down Expand Up @@ -118,13 +119,13 @@ def __init__(self, url, key=None, secret=None, timeout=5, context=None):
if type(secret) == str:
secret = six.u(secret)

assert(type(url) == six.text_type)
assert((key and secret) or (not key and not secret))
assert(key is None or type(key) == six.text_type)
assert(secret is None or type(secret) == six.text_type)
assert(type(timeout) == int)
assert (type(url) == six.text_type)
assert ((key and secret) or (not key and not secret))
assert (key is None or type(key) == six.text_type)
assert (secret is None or type(secret) == six.text_type)
assert (type(timeout) == int)
if _HAS_SSL and _HAS_SSL_CLIENT_CONTEXT:
assert(context is None or isinstance(context, ssl.SSLContext))
assert (context is None or isinstance(context, ssl.SSLContext))

self._seq = 1
self._key = key
Expand Down Expand Up @@ -171,7 +172,7 @@ def publish(self, topic, *args, **kwargs):
"""
if six.PY2 and type(topic) == str:
topic = six.u(topic)
assert(type(topic) == six.text_type)
assert (type(topic) == six.text_type)

# this will get filled and later serialized into HTTP/POST body
event = {
Expand All @@ -180,7 +181,7 @@ def publish(self, topic, *args, **kwargs):

if 'options' in kwargs:
event['options'] = kwargs.pop('options')
assert(type(event['options']) == dict)
assert (type(event['options']) == dict)

if args:
event['args'] = args
Expand Down

0 comments on commit fafbab4

Please sign in to comment.