mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-05 23:13:46 +08:00
observe type-checking :/
This commit is contained in:
parent
6ff484a777
commit
051dab69cd
@ -82,9 +82,9 @@ def get_player_profile_colors(
|
|||||||
highlight = (0.4, 0.4, 0.5)
|
highlight = (0.4, 0.4, 0.5)
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
color = profiles[profilename]['color']
|
|
||||||
assert profilename is not None
|
assert profilename is not None
|
||||||
except KeyError:
|
color = profiles[profilename]['color']
|
||||||
|
except (KeyError, AssertionError):
|
||||||
# key off name if possible
|
# key off name if possible
|
||||||
if profilename is None:
|
if profilename is None:
|
||||||
# first 6 are bright-ish
|
# first 6 are bright-ish
|
||||||
@ -94,9 +94,9 @@ def get_player_profile_colors(
|
|||||||
color = PLAYER_COLORS[sum([ord(c) for c in profilename]) % 6]
|
color = PLAYER_COLORS[sum([ord(c) for c in profilename]) % 6]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
highlight = profiles[profilename]['highlight']
|
|
||||||
assert profilename is not None
|
assert profilename is not None
|
||||||
except KeyError:
|
highlight = profiles[profilename]['highlight']
|
||||||
|
except (KeyError, AssertionError):
|
||||||
# key off name if possible
|
# key off name if possible
|
||||||
if profilename is None:
|
if profilename is None:
|
||||||
# last 2 are grey and white; ignore those or we
|
# last 2 are grey and white; ignore those or we
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user