diff --git a/game/commander/tasks/primitive/oca.py b/game/commander/tasks/primitive/oca.py index 0fdcc547..6877150d 100644 --- a/game/commander/tasks/primitive/oca.py +++ b/game/commander/tasks/primitive/oca.py @@ -25,7 +25,7 @@ class PlanOcaStrike(PackagePlanningTask[ControlPoint]): def propose_flights(self) -> None: size = self.get_flight_size() if self.target.cptype == self.target.cptype.AIRBASE: - self.propose_flight(FlightType.OCA_RUNWAY, size) + self.propose_flight(FlightType.OCA_RUNWAY, size) # type:ignore[unreachable] if self.aircraft_cold_start: self.propose_flight(FlightType.OCA_AIRCRAFT, 2) self.propose_common_escorts() diff --git a/game/missiongenerator/aircraft/waypoints/antishipingress.py b/game/missiongenerator/aircraft/waypoints/antishipingress.py index c9c390a9..c73d9308 100644 --- a/game/missiongenerator/aircraft/waypoints/antishipingress.py +++ b/game/missiongenerator/aircraft/waypoints/antishipingress.py @@ -35,5 +35,7 @@ class AntiShipIngressBuilder(PydcsWaypointBuilder): ) continue - task = AttackGroup(miz_group.id, group_attack=True, weapon_type=WeaponType.Auto) + task = AttackGroup( + miz_group.id, group_attack=True, weapon_type=WeaponType.Auto + ) waypoint.tasks.append(task) diff --git a/game/missiongenerator/kneeboard.py b/game/missiongenerator/kneeboard.py index 40459085..87bb816a 100644 --- a/game/missiongenerator/kneeboard.py +++ b/game/missiongenerator/kneeboard.py @@ -73,16 +73,16 @@ class KneeboardPageWriter: # probably do), we'll need to split some of this information off into a # second page. self.title_font = ImageFont.truetype( - "courbd.ttf", 32, layout_engine=ImageFont.LAYOUT_BASIC + "courbd.ttf", 32, layout_engine=ImageFont.Layout.BASIC ) self.heading_font = ImageFont.truetype( - "courbd.ttf", 24, layout_engine=ImageFont.LAYOUT_BASIC + "courbd.ttf", 24, layout_engine=ImageFont.Layout.BASIC ) self.content_font = ImageFont.truetype( - "courbd.ttf", 16, layout_engine=ImageFont.LAYOUT_BASIC + "courbd.ttf", 16, layout_engine=ImageFont.Layout.BASIC ) self.table_font = ImageFont.truetype( - "courbd.ttf", 20, layout_engine=ImageFont.LAYOUT_BASIC + "courbd.ttf", 20, layout_engine=ImageFont.Layout.BASIC ) self.draw = ImageDraw.Draw(self.image) self.page_margin = page_margin @@ -116,7 +116,7 @@ class KneeboardPageWriter: ) self.draw.text(self.position, text, font=font, fill=fill) - width, height = self.draw.textsize(text, font=font) + width, height = self.draw.textsize(text, font=font) # type:ignore[attr-defined] self.y += height + self.line_spacing self.text_buffer.append(text) @@ -170,14 +170,14 @@ class KneeboardPageWriter: def wrap_line_with_font( inputstr: str, max_width: int, font: ImageFont.FreeTypeFont ) -> str: - if font.getsize(inputstr)[0] <= max_width: + if font.getsize(inputstr)[0] <= max_width: # type:ignore[attr-defined] return inputstr tokens = inputstr.split(" ") output = "" segments = [] for token in tokens: combo = output + " " + token - if font.getsize(combo)[0] > max_width: + if font.getsize(combo)[0] > max_width: # type:ignore[attr-defined] segments.append(output + "\n") output = token else: @@ -339,7 +339,7 @@ class BriefingPage(KneeboardPage): self.flight_plan_font = ImageFont.truetype( "courbd.ttf", 16, - layout_engine=ImageFont.LAYOUT_BASIC, + layout_engine=ImageFont.Layout.BASIC, ) def write(self, path: Path) -> None: diff --git a/requirements.txt b/requirements.txt index 0a486df7..2dac60f3 100644 --- a/requirements.txt +++ b/requirements.txt @@ -26,8 +26,8 @@ nodeenv==1.8.0 packaging==23.1 pathspec==0.11.1 pefile==2023.2.7 -Pillow==10.0.0 -platformdirs==3.8.1 +Pillow==9.5.0 +platformdirs==3.9.0 pluggy==1.2.0 pre-commit==3.3.3 pydantic==2.0.3 @@ -49,7 +49,7 @@ Shapely==2.0.1 shiboken2==5.15.2.1 six==1.16.0 sniffio==1.3.0 -starlette==0.30.0 +starlette==0.27.0 tabulate==0.9.0 text-unidecode==1.3 toml==0.10.2