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:
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()

View File

@ -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)

View File

@ -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:

View File

@ -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