style: ruff format 10 python files

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jason Staack
2026-03-19 13:49:59 -05:00
parent 9d6b68760f
commit 6a5829e0ff
10 changed files with 41 additions and 67 deletions

View File

@@ -58,9 +58,7 @@ def upgrade() -> None:
)
conn.execute(
sa.text(
"SELECT create_hypertable('wireless_registrations', 'time', if_not_exists => TRUE)"
)
sa.text("SELECT create_hypertable('wireless_registrations', 'time', if_not_exists => TRUE)")
)
# Primary lookup: device + time range
@@ -126,9 +124,7 @@ def upgrade() -> None:
)
conn.execute(
sa.text(
"SELECT create_hypertable('rf_monitor_stats', 'time', if_not_exists => TRUE)"
)
sa.text("SELECT create_hypertable('rf_monitor_stats', 'time', if_not_exists => TRUE)")
)
conn.execute(
@@ -157,23 +153,17 @@ def upgrade() -> None:
conn.execute(sa.text("GRANT SELECT, INSERT ON rf_monitor_stats TO app_user"))
conn.execute(sa.text("GRANT SELECT, INSERT ON rf_monitor_stats TO poller_user"))
conn.execute(
sa.text("SELECT add_retention_policy('rf_monitor_stats', INTERVAL '30 days')")
)
conn.execute(sa.text("SELECT add_retention_policy('rf_monitor_stats', INTERVAL '30 days')"))
def downgrade() -> None:
conn = op.get_bind()
# Remove retention policies before dropping tables
conn.execute(
sa.text("SELECT remove_retention_policy('rf_monitor_stats', if_exists => true)")
)
conn.execute(sa.text("SELECT remove_retention_policy('rf_monitor_stats', if_exists => true)"))
conn.execute(sa.text("DROP TABLE IF EXISTS rf_monitor_stats CASCADE"))
conn.execute(
sa.text(
"SELECT remove_retention_policy('wireless_registrations', if_exists => true)"
)
sa.text("SELECT remove_retention_policy('wireless_registrations', if_exists => true)")
)
conn.execute(sa.text("DROP TABLE IF EXISTS wireless_registrations CASCADE"))