remove cyclical imports

This commit is contained in:
Khaleel Al-Adhami 2024-10-16 17:00:02 -07:00
parent 11da6ecb25
commit 3893ccf8dc
2 changed files with 3 additions and 10 deletions

View File

@ -5,8 +5,6 @@ from __future__ import annotations
import platform
from types import SimpleNamespace
from reflex.config import environment
from .base import IS_WINDOWS, Reflex
@ -55,9 +53,6 @@ class Bun(SimpleNamespace):
# Path of the bunfig file
CONFIG_PATH = "bunfig.toml"
# The environment variable to use the system installed bun.
USE_SYSTEM = environment.REFLEX_USE_SYSTEM_BUN
# FNM config.
class Fnm(SimpleNamespace):
@ -101,9 +96,6 @@ class Node(SimpleNamespace):
# The default path where npm is installed.
NPM_PATH = BIN_PATH / "npm"
# The environment variable to use the system installed node.
USE_SYSTEM = environment.REFLEX_USE_SYSTEM_NODE
class PackageJson(SimpleNamespace):
"""Constants used to build the package.json file."""

View File

@ -9,6 +9,7 @@ import shutil
from pathlib import Path
from reflex import constants
from reflex.config import environment
# Shorthand for join.
join = os.linesep.join
@ -135,7 +136,7 @@ def use_system_node() -> bool:
Returns:
Whether the system node should be used.
"""
return constants.Node.USE_SYSTEM
return environment.REFLEX_USE_SYSTEM_NODE
def use_system_bun() -> bool:
@ -144,7 +145,7 @@ def use_system_bun() -> bool:
Returns:
Whether the system bun should be used.
"""
return constants.Bun.USE_SYSTEM
return environment.REFLEX_USE_SYSTEM_BUN
def get_node_bin_path() -> Path | None: