Skip to content

Commit

Permalink
fix type ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
xoolive committed Jun 3, 2024
1 parent 28da8ee commit ae89919
Showing 1 changed file with 7 additions and 11 deletions.
18 changes: 7 additions & 11 deletions src/pyopensky/trino.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def flightlist(
else start_ts + pd.Timedelta("1d")
)

stmt = select(Table).with_only_columns( # type: ignore
stmt = select(Table).with_only_columns(
Table.icao24,
Table.firstseen,
Table.estdepartureairport,
Expand All @@ -308,21 +308,17 @@ def flightlist(
*(extra_columns if extra_columns is not None else []),
)

stmt = self.stmt_where_str(stmt, icao24, Table.icao24) # type: ignore
stmt = self.stmt_where_str(
stmt,
callsign,
Table.callsign, # type: ignore
)
stmt = self.stmt_where_str(stmt, icao24, Table.icao24)
stmt = self.stmt_where_str(stmt, callsign, Table.callsign)
stmt = self.stmt_where_str(
stmt,
departure_airport,
Table.estdepartureairport, # type: ignore
Table.estdepartureairport,
)
stmt = self.stmt_where_str(
stmt,
arrival_airport,
Table.estarrivalairport, # type: ignore
Table.estarrivalairport,
)
if airport is not None and arrival_airport is not None:
raise RuntimeError("airport may not be set if arrival_airport is")
Expand All @@ -331,8 +327,8 @@ def flightlist(
stmt = self.stmt_where_str(
stmt,
airport,
Table.estdepartureairport, # type: ignore
Table.estarrivalairport, # type: ignore
Table.estdepartureairport,
Table.estarrivalairport,
)

if departure_airport is not None:
Expand Down

0 comments on commit ae89919

Please sign in to comment.