Skip to content

Commit

Permalink
Correct code style
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyklay committed Nov 8, 2024
1 parent 69778c4 commit 252762d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions environ/environ.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ class Env:
CLOUDSQL = 'cloudsql'

DEFAULT_CHANNELS_ENV = "CHANNELS_URL"
CHANNELS_SCHEMES = {
CHANNELS_SCHEMES = {
"inmemory": "channels.layers.InMemoryChannelLayer",
"redis": "channels_redis.core.RedisChannelLayer",
"redis+pubsub": "channels_redis.pubsub.RedisPubSubChannelLayer"
Expand Down Expand Up @@ -345,7 +345,8 @@ def search_url(self, var=DEFAULT_SEARCH_ENV, default=NOTSET, engine=None):
engine=engine
)

def channels_url(self, var=DEFAULT_CHANNELS_ENV, default=NOTSET, backend=None):
def channels_url(self, var=DEFAULT_CHANNELS_ENV, default=NOTSET,
backend=None):
"""Returns a config dictionary, defaulting to CHANNELS_URL.
:rtype: dict
Expand Down Expand Up @@ -755,7 +756,7 @@ def email_url_config(cls, url, backend=None):
config['OPTIONS'] = config_options

return config

@classmethod
def channels_url_config(cls, url, backend=None):
"""Parse an arbitrary channels URL.
Expand All @@ -769,7 +770,7 @@ def channels_url_config(cls, url, backend=None):
"""
config = {}
url = urlparse(url) if not isinstance(url, cls.URL_CLASS) else url

if backend:
config["BACKEND"] = backend
elif url.scheme not in cls.CHANNELS_SCHEMES:
Expand Down Expand Up @@ -856,7 +857,7 @@ def search_url_config(cls, url, engine=None):
:param urllib.parse.ParseResult or str url:
Search URL to parse.
:param str or None engine:
If None, the engine is evaluates from the ``url``.
If None, the engine is evaluating from the ``url``.
:return: Parsed search URL.
:rtype: dict
"""
Expand Down

0 comments on commit 252762d

Please sign in to comment.