Skip to content

Commit

Permalink
Simplify codebase by removing Python 3.5 support
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeyklay committed Apr 23, 2023
1 parent 52455fb commit 69b4bc9
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions environ/environ.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,7 @@
)
from .fileaware_mapping import FileAwareMapping

try:
from os import PathLike
except ImportError: # Python 3.5 support
from pathlib import PurePath as PathLike

Openable = (str, PathLike)

Openable = (str, os.PathLike)
logger = logging.getLogger(__name__)


Expand Down Expand Up @@ -832,8 +826,7 @@ def search_url_config(cls, url, engine=None):
scheme = scheme[:-1]
secure = True
if scheme not in cls.SEARCH_SCHEMES:
raise ImproperlyConfigured(
'Invalid search schema ' + url.scheme)
raise ImproperlyConfigured(f'Invalid search schema {url.scheme}')
config['ENGINE'] = cls.SEARCH_SCHEMES[scheme]

# check commons params
Expand Down

0 comments on commit 69b4bc9

Please sign in to comment.