Răsfoiți Sursa

company: type fix

this was broken by 6492f0eb
raylu 1 săptămână în urmă
părinte
comite
9b4145d2f6
1 a modificat fișierele cu 6 adăugiri și 3 ștergeri
  1. 6 3
      company.py

+ 6 - 3
company.py

@@ -7,7 +7,6 @@ import typing
 
 import cache
 import integration
-import roi
 
 def main() -> None:
 	code = sys.argv[1]
@@ -40,7 +39,7 @@ def main() -> None:
 	print()
 
 	company_report = integration.pmmg_monthly_report()[company['CompanyId']]
-	for mat, data in company_report.items():
+	for mat in company_report.keys():
 		expertise = experts.get(mat)
 		print(mat, expertise, ', '.join(cogc_planets.get(expertise, []))) # pyright: ignore[reportArgumentType, reportCallIssue]
 
@@ -64,7 +63,11 @@ class Building(typing.TypedDict):
 	Expertise: str
 
 class BuildingRecipe(typing.TypedDict):
-	Outputs: typing.Sequence[roi.BuildingMat]
+	Outputs: typing.Sequence[BuildingMat]
+
+class BuildingMat(typing.TypedDict):
+	CommodityTicker: str
+	Amount: int
 
 if __name__ == '__main__':
 	main()