update code to reflect the new minimum python version 3.7

- update string format method
- remove redundant default arguments from function  calls
- remove unused imports
- remove unicode identifier from strings, it's default in py3 (see: https://stackoverflow.com/a/4182635/12201331)
This commit is contained in:
Peter Pfeufer
2021-10-18 11:59:05 +02:00
parent 2fe1de1c97
commit a6b340c179
199 changed files with 499 additions and 590 deletions

View File

@@ -36,7 +36,7 @@ from . import get_admin_change_view_url, get_admin_search_url
MODULE_PATH = 'allianceauth.authentication.admin'
class MockRequest(object):
class MockRequest:
def __init__(self, user=None):
self.user = user
@@ -188,7 +188,7 @@ def make_generic_search_request(ModelClass: type, search_term: str):
c = Client()
c.login(username='superuser', password='secret')
return c.get(
'%s?q=%s' % (get_admin_search_url(ModelClass), quote(search_term))
f'{get_admin_search_url(ModelClass)}?q={quote(search_term)}'
)