Follow-up on dependency updates

This commit is contained in:
Raffson 2023-07-15 17:46:58 +02:00
parent 6c87421c26
commit 009debd4e8
No known key found for this signature in database
GPG Key ID: B0402B2C9B764D99
4 changed files with 15 additions and 13 deletions

View File

@ -25,7 +25,7 @@ class PlanOcaStrike(PackagePlanningTask[ControlPoint]):
def propose_flights(self) -> None: def propose_flights(self) -> None:
size = self.get_flight_size() size = self.get_flight_size()
if self.target.cptype == self.target.cptype.AIRBASE: 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: if self.aircraft_cold_start:
self.propose_flight(FlightType.OCA_AIRCRAFT, 2) self.propose_flight(FlightType.OCA_AIRCRAFT, 2)
self.propose_common_escorts() self.propose_common_escorts()

View File

@ -35,5 +35,7 @@ class AntiShipIngressBuilder(PydcsWaypointBuilder):
) )
continue 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) waypoint.tasks.append(task)

View File

@ -73,16 +73,16 @@ class KneeboardPageWriter:
# probably do), we'll need to split some of this information off into a # probably do), we'll need to split some of this information off into a
# second page. # second page.
self.title_font = ImageFont.truetype( 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( 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( 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( 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.draw = ImageDraw.Draw(self.image)
self.page_margin = page_margin self.page_margin = page_margin
@ -116,7 +116,7 @@ class KneeboardPageWriter:
) )
self.draw.text(self.position, text, font=font, fill=fill) 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.y += height + self.line_spacing
self.text_buffer.append(text) self.text_buffer.append(text)
@ -170,14 +170,14 @@ class KneeboardPageWriter:
def wrap_line_with_font( def wrap_line_with_font(
inputstr: str, max_width: int, font: ImageFont.FreeTypeFont inputstr: str, max_width: int, font: ImageFont.FreeTypeFont
) -> str: ) -> str:
if font.getsize(inputstr)[0] <= max_width: if font.getsize(inputstr)[0] <= max_width: # type:ignore[attr-defined]
return inputstr return inputstr
tokens = inputstr.split(" ") tokens = inputstr.split(" ")
output = "" output = ""
segments = [] segments = []
for token in tokens: for token in tokens:
combo = output + " " + token 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") segments.append(output + "\n")
output = token output = token
else: else:
@ -339,7 +339,7 @@ class BriefingPage(KneeboardPage):
self.flight_plan_font = ImageFont.truetype( self.flight_plan_font = ImageFont.truetype(
"courbd.ttf", "courbd.ttf",
16, 16,
layout_engine=ImageFont.LAYOUT_BASIC, layout_engine=ImageFont.Layout.BASIC,
) )
def write(self, path: Path) -> None: def write(self, path: Path) -> None:

View File

@ -26,8 +26,8 @@ nodeenv==1.8.0
packaging==23.1 packaging==23.1
pathspec==0.11.1 pathspec==0.11.1
pefile==2023.2.7 pefile==2023.2.7
Pillow==10.0.0 Pillow==9.5.0
platformdirs==3.8.1 platformdirs==3.9.0
pluggy==1.2.0 pluggy==1.2.0
pre-commit==3.3.3 pre-commit==3.3.3
pydantic==2.0.3 pydantic==2.0.3
@ -49,7 +49,7 @@ Shapely==2.0.1
shiboken2==5.15.2.1 shiboken2==5.15.2.1
six==1.16.0 six==1.16.0
sniffio==1.3.0 sniffio==1.3.0
starlette==0.30.0 starlette==0.27.0
tabulate==0.9.0 tabulate==0.9.0
text-unidecode==1.3 text-unidecode==1.3
toml==0.10.2 toml==0.10.2