Compare commits

...

4 Commits

Author SHA1 Message Date
32f18c007f Bump version: 0.29.0.1 → 0.29.0.2 2022-02-01 22:40:58 +02:00
671f53843c Bugfixes 2022-02-01 22:40:53 +02:00
6b40f8f7aa Bump version: 0.29.0 → 0.29.0.1 2022-02-01 22:35:27 +02:00
db3282cde0 Bugfix 2022-02-01 22:35:12 +02:00
4 changed files with 6 additions and 6 deletions

View File

@ -4,7 +4,7 @@
__author__ = """Eriks Karls"""
__email__ = "eriks@72.lv"
__version__ = "0.29.0"
__version__ = "0.29.0.2"
from erepublik.citizen import Citizen

View File

@ -382,7 +382,7 @@ class MyCompanies:
return raw_factories.pop(-1)
else:
if raw:
raw += inv_raw.get(constants.INDUSTRIES[ids[1]], {}).get(0, {}).get("amount", 0.0)
raw += inv_raw.get(constants.INDUSTRIES[ids[1]], {}).get(0, {}).get("amount", Decimal("0.0"))
if raw > 0:
to_remove = sorted(raw_factories, key=lambda c: (c.industry not in ids, c.raw_usage))
if to_remove:
@ -392,8 +392,8 @@ class MyCompanies:
if to_remove:
return final_factories.remove(to_remove[0])
def get_raw_usage_for_companies(self, *companies: Company) -> Tuple[float, float, float, float]:
frm = wrm = hrm = arm = 0.0
frm = wrm = hrm = arm = Decimal("0.00")
def get_raw_usage_for_companies(self, *companies: Company) -> Tuple[Decimal, Decimal, Decimal, Decimal]:
for company in companies:
if company.industry in self._frm_fab_ids:
frm += company.raw_usage

View File

@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.29.0
current_version = 0.29.0.2
commit = True
tag = True
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)\.?(?P<dev>\d+)?

View File

@ -49,6 +49,6 @@ setup(
test_suite="tests",
tests_require=test_requirements,
url="https://github.com/eeriks/erepublik/",
version="0.29.0",
version="0.29.0.2",
zip_safe=False,
)