Skip to content

Commit f7d7f42

Browse files
committed
post merge issues
1 parent 6a1b3ed commit f7d7f42

4 files changed

Lines changed: 50 additions & 52 deletions

File tree

pyi_hashes.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"reflex/__init__.pyi": "19f58e6bbb6846d14ccdd4364afb957c",
2+
"reflex/__init__.pyi": "e9f08e115b1e1dd89beabacade84a589",
33
"reflex/components/__init__.pyi": "ac05995852baa81062ba3d18fbc489fb",
44
"reflex/components/base/__init__.pyi": "16e47bf19e0d62835a605baa3d039c5a",
55
"reflex/components/base/app_wrap.pyi": "ae600e2cc9d70f2ce613bdd6c1da3b16",

reflex/event.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2202,7 +2202,7 @@ class EventNamespace:
22022202
# Javascript Event Classes
22032203
JavascriptHTMLInputElement = JavascriptHTMLInputElement
22042204
JavascriptInputEvent = JavascriptInputEvent
2205-
JavasciptKeyboardEvent = JavasciptKeyboardEvent
2205+
JavascriptKeyboardEvent = JavascriptKeyboardEvent
22062206
JavascriptMouseEvent = JavascriptMouseEvent
22072207
JavascriptPointerEvent = JavascriptPointerEvent
22082208

reflex/model.py

Lines changed: 48 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def get_metadata(cls) -> sqlalchemy.MetaData:
140140
import sqlalchemy.ext.asyncio
141141
import sqlalchemy.orm
142142
from alembic.runtime.migration import MigrationContext
143-
from alembic.script.base import Script
143+
from alembic.script.base import Script
144144

145145
from reflex.utils.compat import sqlmodel, sqlmodel_field_has_primary_key
146146

@@ -151,40 +151,39 @@ def get_metadata(cls) -> sqlalchemy.MetaData:
151151
# Import AsyncSession _after_ reflex.utils.compat
152152
from sqlmodel.ext.asyncio.session import AsyncSession
153153

154-
def format_revision(
155-
rev: Script,
156-
current_rev: str | None,
157-
current_reached_ref: list[bool],
158-
) -> str:
159-
"""Format a single revision for display.
160-
161-
Args:
162-
rev: The alembic script object
163-
current_rev: The currently applied revision ID
164-
current_reached_ref: Mutable reference to track if we've reached current revision
165-
166-
Returns:
167-
Formatted string for display
168-
"""
169-
current = rev.revision
170-
message = rev.doc
171-
172-
# Determine if this migration is applied
173-
if current_rev is None:
174-
is_applied = False
175-
elif current == current_rev:
176-
is_applied = True
177-
current_reached_ref[0] = True
178-
else:
179-
is_applied = not current_reached_ref[0]
180-
181-
# Show checkmark or X with colors
182-
status_icon = "[green]✓[/green]" if is_applied else "[red]✗[/red]"
183-
head_marker = " (head)" if rev.is_head else ""
184-
185-
# Format output with message
186-
return f" [{status_icon}] {current}{head_marker}, {message}"
154+
def format_revision(
155+
rev: Script,
156+
current_rev: str | None,
157+
current_reached_ref: list[bool],
158+
) -> str:
159+
"""Format a single revision for display.
187160
161+
Args:
162+
rev: The alembic script object
163+
current_rev: The currently applied revision ID
164+
current_reached_ref: Mutable reference to track if we've reached current revision
165+
166+
Returns:
167+
Formatted string for display
168+
"""
169+
current = rev.revision
170+
message = rev.doc
171+
172+
# Determine if this migration is applied
173+
if current_rev is None:
174+
is_applied = False
175+
elif current == current_rev:
176+
is_applied = True
177+
current_reached_ref[0] = True
178+
else:
179+
is_applied = not current_reached_ref[0]
180+
181+
# Show checkmark or X with colors
182+
status_icon = "[green]✓[/green]" if is_applied else "[red]✗[/red]"
183+
head_marker = " (head)" if rev.is_head else ""
184+
185+
# Format output with message
186+
return f" [{status_icon}] {current}{head_marker}, {message}"
188187

189188
def _safe_db_url_for_logging(url: str) -> str:
190189
"""Remove username and password from the database URL for logging.
@@ -429,25 +428,25 @@ def alembic_init(cls):
429428
)
430429

431430
@classmethod
432-
def get_migration_history(cls):
433-
"""Get migration history with current database state.
431+
def get_migration_history(cls):
432+
"""Get migration history with current database state.
434433
435-
Returns:
436-
tuple: (current_revision, revisions_list) where revisions_list is in chronological order
437-
"""
438-
# Get current revision from database
439-
with cls.get_db_engine().connect() as connection:
440-
context = MigrationContext.configure(connection)
441-
current_rev = context.get_current_revision()
434+
Returns:
435+
tuple: (current_revision, revisions_list) where revisions_list is in chronological order
436+
"""
437+
# Get current revision from database
438+
with cls.get_db_engine().connect() as connection:
439+
context = MigrationContext.configure(connection)
440+
current_rev = context.get_current_revision()
442441

443-
# Get all revisions from base to head
444-
_, script_dir = cls._alembic_config()
445-
revisions = list(script_dir.walk_revisions())
446-
revisions.reverse() # Reverse to get chronological order (base first)
442+
# Get all revisions from base to head
443+
_, script_dir = cls._alembic_config()
444+
revisions = list(script_dir.walk_revisions())
445+
revisions.reverse() # Reverse to get chronological order (base first)
447446

448-
return current_rev, revisions
447+
return current_rev, revisions
449448

450-
@classmethod
449+
@classmethod
451450
def alembic_autogenerate(
452451
cls,
453452
connection: sqlalchemy.engine.Connection,

tests/units/test_app.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
from starlette.applications import Starlette
1717
from starlette.datastructures import UploadFile
1818
from starlette.responses import StreamingResponse
19-
from starlette.responses import StreamingResponse
2019

2120
import reflex as rx
2221
from reflex import AdminDash, constants

0 commit comments

Comments
 (0)