style: apply ruff formatting
This commit is contained in:
@@ -473,12 +473,10 @@ async def ensure_required_channel_subscription(
|
|||||||
|
|
||||||
|
|
||||||
@router.message(CommandStart())
|
@router.message(CommandStart())
|
||||||
|
@router.message(CommandStart(magic=F.args.regexp(r"^ref_([A-Za-z0-9_-]{1,64})$").as_("ref_match")))
|
||||||
@router.message(
|
@router.message(
|
||||||
CommandStart(
|
CommandStart(magic=F.args.regexp(r"^promo_([A-Za-z0-9_-]{1,100})$").as_("promo_match"))
|
||||||
magic=F.args.regexp(r"^ref_([A-Za-z0-9_-]{1,64})$").as_("ref_match")
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
@router.message(CommandStart(magic=F.args.regexp(r"^promo_([A-Za-z0-9_-]{1,100})$").as_("promo_match")))
|
|
||||||
@router.message(CommandStart(magic=F.args.regexp(r"^admin_user_(\d+)$").as_("admin_user_match")))
|
@router.message(CommandStart(magic=F.args.regexp(r"^admin_user_(\d+)$").as_("admin_user_match")))
|
||||||
@router.message(CommandStart(magic=F.args.regexp(r"^ticket_(\d+)$").as_("ticket_match")))
|
@router.message(CommandStart(magic=F.args.regexp(r"^ticket_(\d+)$").as_("ticket_match")))
|
||||||
@router.message(CommandStart(magic=F.args.regexp(r"^notifications$").as_("notifications_match")))
|
@router.message(CommandStart(magic=F.args.regexp(r"^notifications$").as_("notifications_match")))
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ class PromoCodeService:
|
|||||||
"promo_code_too_many_attempts",
|
"promo_code_too_many_attempts",
|
||||||
seconds=throttle_result.retry_after
|
seconds=throttle_result.retry_after
|
||||||
or max(1, int(self.settings.BRUTE_FORCE_LOCK_SECONDS)),
|
or max(1, int(self.settings.BRUTE_FORCE_LOCK_SECONDS)),
|
||||||
)
|
)
|
||||||
return False, _("promo_code_not_found", code=code_display)
|
return False, _("promo_code_not_found", code=code_display)
|
||||||
|
|
||||||
applied_code = str(promo_data.code or lookup_code)
|
applied_code = str(promo_data.code or lookup_code)
|
||||||
|
|||||||
@@ -409,9 +409,7 @@ class LegacyReferralCode(Base):
|
|||||||
|
|
||||||
user = relationship("User")
|
user = relationship("User")
|
||||||
|
|
||||||
__table_args__ = (
|
__table_args__ = (UniqueConstraint("source", "code", name="uq_legacy_referral_source_code"),)
|
||||||
UniqueConstraint("source", "code", name="uq_legacy_referral_source_code"),
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class LegacyImportMapping(Base):
|
class LegacyImportMapping(Base):
|
||||||
|
|||||||
@@ -1,2 +1 @@
|
|||||||
"""Operational one-shot scripts shipped with the backend image."""
|
"""Operational one-shot scripts shipped with the backend image."""
|
||||||
|
|
||||||
|
|||||||
@@ -552,8 +552,7 @@ def remnashop_post_migration_actions(
|
|||||||
"new_url": _target_webhook_url(target_webhook_base_url, "/webhook/panel"),
|
"new_url": _target_webhook_url(target_webhook_base_url, "/webhook/panel"),
|
||||||
"where": "Remnawave Panel -> WEBHOOK_URL",
|
"where": "Remnawave Panel -> WEBHOOK_URL",
|
||||||
"secret": (
|
"secret": (
|
||||||
"Set the Remnawave webhook secret to the value stored in "
|
"Set the Remnawave webhook secret to the value stored in PANEL_WEBHOOK_SECRET."
|
||||||
"PANEL_WEBHOOK_SECRET."
|
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
"payment_providers": payment_actions,
|
"payment_providers": payment_actions,
|
||||||
|
|||||||
@@ -57,8 +57,8 @@ def test_shell_installer_only_prepares_data_mount_not_runtime_content():
|
|||||||
script = INSTALL_SCRIPT.read_text(encoding="utf-8")
|
script = INSTALL_SCRIPT.read_text(encoding="utf-8")
|
||||||
|
|
||||||
assert 'data_dir="$TARGET_DIR/data"' in script
|
assert 'data_dir="$TARGET_DIR/data"' in script
|
||||||
assert "mkdir -p \"$data_dir\"" in script
|
assert 'mkdir -p "$data_dir"' in script
|
||||||
assert "chown \"$APP_UID:$APP_GID\" \"$data_dir\"" in script
|
assert 'chown "$APP_UID:$APP_GID" "$data_dir"' in script
|
||||||
assert "data_dir/themes" not in script
|
assert "data_dir/themes" not in script
|
||||||
assert "webapp-logo" not in script
|
assert "webapp-logo" not in script
|
||||||
assert "webapp-emoji" not in script
|
assert "webapp-emoji" not in script
|
||||||
|
|||||||
Reference in New Issue
Block a user