Skip to content

Commit

Permalink
lint & format fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fpletz committed Jul 6, 2024
1 parent 995c6d7 commit 07671d1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion mapbuilder/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def main(prog_name: str, *argv: str) -> int:
"--cache",
type=Path,
default=None,
help="Cache directory for downloaded resources (default: .cache in target directory)"
help="Cache directory for downloaded resources (default: .cache in target directory)",
)
argp.add_argument("--debug", action="store_true", help="Enable debug output")

Expand Down
7 changes: 6 additions & 1 deletion mapbuilder/data/sectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@


def parse_sectors(file_path: Path):
pattern = r"^(\w{4})·([^·]*)·(\d{3})·(\d{3})\s*([NS])(\d{3})\.(\d{2}).(\d{2}).(\d{3}) ([EW])(\d{3})\.(\d{2}).(\d{2}).(\d{3}) ([NS])(\d{3})\.(\d{2}).(\d{2}).(\d{3}) ([EW])(\d{3})\.(\d{2}).(\d{2}).(\d{3})$"
pattern = (
r"^(\w{4})·([^·]*)·(\d{3})·(\d{3})\s*([NS])(\d{3})\.(\d{2}).(\d{2}).(\d{3}) "
r"([EW])(\d{3})\.(\d{2}).(\d{2}).(\d{3}) "
r"([NS])(\d{3})\.(\d{2}).(\d{2}).(\d{3}) "
r"([EW])(\d{3})\.(\d{2}).(\d{2}).(\d{3})$"
)

sectors = {}

Expand Down
7 changes: 4 additions & 3 deletions mapbuilder/utils/ecl.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

from mapbuilder.utils.geo import Brg, Fix, back_bearing


Expand Down Expand Up @@ -41,7 +40,9 @@ def draw_marker_ticks(rwy_info, at: list, gap: float, length: float):
for dist in at:
base = Fix(rwy_info["thr"]).move_to(dist, brg)

lines.extend((str(base.move_to(gap, tick_brg).line_to(length, tick_brg)),
str(base.move_to(-gap, tick_brg).line_to(-length, tick_brg))))
lines.extend((
str(base.move_to(gap, tick_brg).line_to(length, tick_brg)),
str(base.move_to(-gap, tick_brg).line_to(-length, tick_brg)),
))

return "\n".join(lines)
2 changes: 1 addition & 1 deletion mapbuilder/utils/geo.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def __sub__(self, other):
return self.adjust(-other)


def _brg(bearing: float | int | Brg) -> float:
def _brg(bearing: float | Brg) -> float:
if isinstance(bearing, float | int):
return bearing
else:
Expand Down

0 comments on commit 07671d1

Please sign in to comment.