mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-12 01:56:25 +01:00
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:
@@ -10,14 +10,14 @@ from .models import EveCorporationInfo
|
||||
|
||||
class EveEntityExistsError(forms.ValidationError):
|
||||
def __init__(self, entity_type_name, id):
|
||||
super(EveEntityExistsError, self).__init__(
|
||||
message='{} with ID {} already exists.'.format(entity_type_name, id))
|
||||
super().__init__(
|
||||
message=f'{entity_type_name} with ID {id} already exists.')
|
||||
|
||||
|
||||
class EveEntityNotFoundError(forms.ValidationError):
|
||||
def __init__(self, entity_type_name, id):
|
||||
super(EveEntityNotFoundError, self).__init__(
|
||||
message='{} with ID {} not found.'.format(entity_type_name, id))
|
||||
super().__init__(
|
||||
message=f'{entity_type_name} with ID {id} not found.')
|
||||
|
||||
|
||||
class EveEntityForm(forms.ModelForm):
|
||||
@@ -170,4 +170,4 @@ class EveCharacterAdmin(admin.ModelAdmin):
|
||||
def get_form(self, request, obj=None, **kwargs):
|
||||
if not obj or not obj.pk:
|
||||
return EveCharacterForm
|
||||
return super(EveCharacterAdmin, self).get_form(request, obj=obj, **kwargs)
|
||||
return super().get_form(request, obj=obj, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user