mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-14 11:06:23 +01:00
formatting storm
This commit is contained in:
@@ -1,10 +1,4 @@
|
||||
from . import (
|
||||
_ESI_CATEGORY_ALLIANCE,
|
||||
_ESI_CATEGORY_CHARACTER,
|
||||
_ESI_CATEGORY_CORPORATION,
|
||||
_ESI_CATEGORY_INVENTORYTYPE
|
||||
)
|
||||
|
||||
from . import _ESI_CATEGORY_ALLIANCE, _ESI_CATEGORY_CHARACTER, _ESI_CATEGORY_CORPORATION, _ESI_CATEGORY_INVENTORYTYPE
|
||||
|
||||
_EVE_IMAGE_SERVER_URL = 'https://images.evetech.net'
|
||||
_DEFAULT_IMAGE_SIZE = 32
|
||||
@@ -70,10 +64,7 @@ def _eve_entity_image_url(
|
||||
|
||||
if variant:
|
||||
if variant not in categories[category]['variants']:
|
||||
raise ValueError('Invalid variant {} for category {}'.format(
|
||||
variant,
|
||||
category
|
||||
))
|
||||
raise ValueError(f'Invalid variant {variant} for category {category}')
|
||||
else:
|
||||
variant = categories[category]['variants'][0]
|
||||
|
||||
@@ -81,13 +72,7 @@ def _eve_entity_image_url(
|
||||
raise ValueError(f'Invalid tenant {tenant}')
|
||||
|
||||
# compose result URL
|
||||
result = '{}/{}/{}/{}?size={}'.format(
|
||||
_EVE_IMAGE_SERVER_URL,
|
||||
endpoint,
|
||||
entity_id,
|
||||
variant,
|
||||
size
|
||||
)
|
||||
result = f'{_EVE_IMAGE_SERVER_URL}/{endpoint}/{entity_id}/{variant}?size={size}'
|
||||
if tenant:
|
||||
result += f'&tenant={tenant}'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user