Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions scripts/regenerate.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,14 @@ def main() -> None:
else:
print(" no changes (already patched?)")

# Auto-format the generated file so `ruff format --check` in CI doesn't
# fail on quote-style or whitespace differences from datamodel-codegen.
print("Formatting generated models with ruff...")
subprocess.run(
[sys.executable, "-m", "ruff", "format", str(OUTPUT)],
check=True,
)
Comment on lines +166 to +170
Copy link

Copilot AI Apr 22, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ruff format will resolve configuration (pyproject.toml) relative to the current working directory. Since this script otherwise supports being run from any directory (it uses absolute OUTPUT), running it from outside the repo root could format with Ruff defaults (e.g., different line length) and reintroduce CI drift. Consider passing cwd pointing at the project root or providing --config with the resolved pyproject.toml path to make formatting deterministic.

Copilot uses AI. Check for mistakes.

# Post-generation sanity check. The running process already imported the
# stale pre-patch module (if at all), so spawn a subprocess for a fresh
# import that reflects what downstream users will see.
Expand Down
48 changes: 24 additions & 24 deletions themeparks/_generated/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,31 @@


class EntityType(Enum):
DESTINATION = 'DESTINATION'
PARK = 'PARK'
ATTRACTION = 'ATTRACTION'
RESTAURANT = 'RESTAURANT'
HOTEL = 'HOTEL'
SHOW = 'SHOW'
DESTINATION = "DESTINATION"
PARK = "PARK"
ATTRACTION = "ATTRACTION"
RESTAURANT = "RESTAURANT"
HOTEL = "HOTEL"
SHOW = "SHOW"


class LiveStatusType(Enum):
OPERATING = 'OPERATING'
DOWN = 'DOWN'
CLOSED = 'CLOSED'
REFURBISHMENT = 'REFURBISHMENT'
OPERATING = "OPERATING"
DOWN = "DOWN"
CLOSED = "CLOSED"
REFURBISHMENT = "REFURBISHMENT"


class ReturnTimeState(Enum):
AVAILABLE = 'AVAILABLE'
TEMP_FULL = 'TEMP_FULL'
FINISHED = 'FINISHED'
AVAILABLE = "AVAILABLE"
TEMP_FULL = "TEMP_FULL"
FINISHED = "FINISHED"


class BoardingGroupState(Enum):
AVAILABLE = 'AVAILABLE'
PAUSED = 'PAUSED'
CLOSED = 'CLOSED'
AVAILABLE = "AVAILABLE"
PAUSED = "PAUSED"
CLOSED = "CLOSED"


class PriceData(BaseModel):
Expand Down Expand Up @@ -157,9 +157,9 @@ class EntityLiveDataResponse(BaseModel):


class Type(Enum):
ADMISSION = 'ADMISSION'
PACKAGE = 'PACKAGE'
ATTRACTION = 'ATTRACTION'
ADMISSION = "ADMISSION"
PACKAGE = "PACKAGE"
ATTRACTION = "ATTRACTION"


class SchedulePriceObject(BaseModel):
Expand All @@ -171,11 +171,11 @@ class SchedulePriceObject(BaseModel):


class Type1(Enum):
OPERATING = 'OPERATING'
TICKETED_EVENT = 'TICKETED_EVENT'
PRIVATE_EVENT = 'PRIVATE_EVENT'
EXTRA_HOURS = 'EXTRA_HOURS'
INFO = 'INFO'
OPERATING = "OPERATING"
TICKETED_EVENT = "TICKETED_EVENT"
PRIVATE_EVENT = "PRIVATE_EVENT"
EXTRA_HOURS = "EXTRA_HOURS"
INFO = "INFO"


class ScheduleEntry(BaseModel):
Expand Down
Loading