More internal return type fixes.

This commit is contained in:
Eric Froemling 2020-04-10 01:52:12 -07:00
parent 19c7b01231
commit 6249b73693
3 changed files with 10 additions and 8 deletions

View File

@ -34,7 +34,7 @@ NOTE: This file was autogenerated by gendummymodule; do not edit by hand.
"""
# (hash we can use to see if this file is out of date)
# SOURCES_HASH=13501269283550798144571003636886602232
# SOURCES_HASH=293498427545140555839175614948455855333
# I'm sorry Pylint. I know this file saddens you. Be strong.
# pylint: disable=useless-suppression
@ -2183,12 +2183,12 @@ def get_package_texture(package: ba.AssetPackage, name: str) -> ba.Texture:
return ba.Texture()
def get_price(item: str) -> str:
"""get_price(item: str) -> str
def get_price(item: str) -> Optional[str]:
"""get_price(item: str) -> Optional[str]
(internal)
"""
return str()
return ""
def get_public_login_id() -> str:

View File

@ -209,8 +209,9 @@ class SpecialOfferWindow(ba.Window):
# Total-value if they supplied it.
total_worth_item = offer.get('valueItem', None)
if total_worth_item is not None:
total_worth_price = get_clean_price(
_ba.get_price(total_worth_item))
price = _ba.get_price(total_worth_item)
assert price is not None
total_worth_price = get_clean_price(price)
if total_worth_price is not None:
total_worth_text = ba.Lstr(resource='store.totalWorthText',
subs=[('${TOTAL_WORTH}',

View File

@ -292,8 +292,9 @@ def instantiate_store_item_display(item_name: str,
{}).get(item_name)
total_worth_price: Optional[str]
if total_worth_item is not None:
total_worth_price = get_clean_price(
_ba.get_price(total_worth_item))
price = _ba.get_price(total_worth_item)
assert price is not None
total_worth_price = get_clean_price(price)
else:
total_worth_price = None