Skip to content

Commit e976722

Browse files
Address greptile bot comments: move runtime version and domain to constants
- Add SPLINE_RUNTIME_VERSION constant for @splinetool/runtime version - Add REFLEX_DOMAIN constant for consistent twitter:domain usage - Update spline.py to use SPLINE_RUNTIME_VERSION constant - Update meta.py to use REFLEX_DOMAIN for all twitter:domain fields - Improves consistency and maintainability of configuration values Addresses greptile bot suggestions on PR #1435 Co-Authored-By: Alek <[email protected]>
1 parent 52c699d commit e976722

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

pcweb/components/spline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import reflex as rx
2-
from pcweb.constants import SPLINE_SCENE_URL
2+
from pcweb.constants import SPLINE_SCENE_URL, SPLINE_RUNTIME_VERSION
33
from reflex.vars import Var
44

55

@@ -11,7 +11,7 @@ class Spline(rx.Component):
1111
scene: Var[str] = SPLINE_SCENE_URL
1212
is_default = True
1313

14-
lib_dependencies: list[str] = ["@splinetool/runtime@1.5.5"]
14+
lib_dependencies: list[str] = [f"@splinetool/runtime@{SPLINE_RUNTIME_VERSION}"]
1515

1616

1717
spline = Spline.create

pcweb/constants.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@
8888
BUGS_URL = "https://github.com/reflex-dev/reflex/issues?q=is%3Aopen+is%3Aissue"
8989

9090
SPLINE_SCENE_URL = "https://prod.spline.design/Br2ec3WwuRGxEuij/scene.splinecode"
91+
SPLINE_RUNTIME_VERSION = "1.5.5"
9192

9293
REFLEX_DOMAIN_URL = "https://reflex.dev/"
94+
REFLEX_DOMAIN = "reflex.dev"
9395
TWITTER_CREATOR = "@getreflex"

pcweb/meta/meta.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import reflex as rx
2-
from pcweb.constants import REFLEX_DOMAIN_URL, TWITTER_CREATOR
2+
from pcweb.constants import REFLEX_DOMAIN_URL, REFLEX_DOMAIN, TWITTER_CREATOR
33

44

55
meta_tags = [
@@ -24,7 +24,7 @@
2424
{"property": "og:image", "content": "/previews/index_preview.png"},
2525
# Twitter Meta Tags
2626
{"name": "twitter:card", "content": "summary_large_image"},
27-
{"property": "twitter:domain", "content": "reflex.dev"},
27+
{"property": "twitter:domain", "content": REFLEX_DOMAIN},
2828
{"property": "twitter:url", "content": REFLEX_DOMAIN_URL},
2929
{"name": "twitter:title", "content": "Reflex · Web apps in Pure Python"},
3030
{
@@ -57,7 +57,7 @@
5757
{"property": "og:image", "content": "/previews/hosting_preview.png"},
5858
# Twitter Meta Tags
5959
{"name": "twitter:card", "content": "summary_large_image"},
60-
{"property": "twitter:domain", "content": "reflex.dev"},
60+
{"property": "twitter:domain", "content": REFLEX_DOMAIN},
6161
{"property": "twitter:url", "content": REFLEX_DOMAIN_URL},
6262
{"name": "twitter:title", "content": "Reflex · Web apps in Pure Python"},
6363
{
@@ -108,7 +108,7 @@ def create_meta_tags(title: str, description: str, image: str) -> list[rx.Compon
108108
{"property": "og:image", "content": image},
109109
# Twitter Meta Tags
110110
{"name": "twitter:card", "content": "summary_large_image"},
111-
{"property": "twitter:domain", "content": "reflex.dev"},
111+
{"property": "twitter:domain", "content": REFLEX_DOMAIN},
112112
{"property": "twitter:url", "content": REFLEX_DOMAIN_URL},
113113
{"name": "twitter:title", "content": title},
114114
{

0 commit comments

Comments
 (0)