Skip to content

Commit

Permalink
refactor: move "flights-" to Spec._name_prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
dangotbanned committed Dec 16, 2024
1 parent bfff9c4 commit 0a19bae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/flights2.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,8 @@ class Spec:
Columns included in the output.
"""

_name_prefix: ClassVar[Literal["flights-"]] = "flights-"

def __init__(
self,
range: DateRange | IntoDateRange,
Expand Down Expand Up @@ -339,7 +341,7 @@ def name(self) -> str:
s = f"{frac}k"
else:
raise TypeError(self.n_rows)
return f"flights-{s}{self.suffix}"
return f"{self._name_prefix}{s}{self.suffix}"

@property
def sort_by(self) -> Column:
Expand Down

0 comments on commit 0a19bae

Please sign in to comment.