From 4d2a85b4411f333d90cc13bb332fbd3269aea016 Mon Sep 17 00:00:00 2001 From: Khaleel Al-Adhami Date: Wed, 16 Oct 2024 18:25:14 -0700 Subject: [PATCH] add return --- reflex/constants/installer.py | 42 +++++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 7 deletions(-) diff --git a/reflex/constants/installer.py b/reflex/constants/installer.py index f26d07fc4..a30808b9f 100644 --- a/reflex/constants/installer.py +++ b/reflex/constants/installer.py @@ -84,7 +84,11 @@ class Bun(SimpleNamespace): @classproperty @classmethod def ROOT_PATH(cls): - """The directory to store the bun.""" + """The directory to store the bun. + + Returns: + The directory to store the bun. + """ from reflex.config import environment return environment.REFLEX_DIR / "bun" @@ -92,7 +96,11 @@ class Bun(SimpleNamespace): @classproperty @classmethod def DEFAULT_PATH(cls): - """Default bun path.""" + """Default bun path. + + Returns: + The default bun path. + """ return cls.ROOT_PATH / "bin" / ("bun" if not IS_WINDOWS else "bun.exe") @@ -113,7 +121,11 @@ class Fnm(SimpleNamespace): @classproperty @classmethod def DIR(cls) -> Path: - """The directory to store fnm.""" + """The directory to store fnm. + + Returns: + The directory to store fnm. + """ from reflex.config import environment return environment.REFLEX_DIR / "fnm" @@ -121,7 +133,11 @@ class Fnm(SimpleNamespace): @classproperty @classmethod def EXE(cls): - """The fnm executable binary.""" + """The fnm executable binary. + + Returns: + The fnm executable binary. + """ return cls.DIR / ("fnm.exe" if IS_WINDOWS else "fnm") @@ -137,7 +153,11 @@ class Node(SimpleNamespace): @classproperty @classmethod def BIN_PATH(cls): - """The node bin path.""" + """The node bin path. + + Returns: + The node bin path. + """ return ( Fnm.DIR / "node-versions" @@ -149,13 +169,21 @@ class Node(SimpleNamespace): @classproperty @classmethod def PATH(cls): - """The default path where node is installed.""" + """The default path where node is installed. + + Returns: + The default path where node is installed. + """ return cls.BIN_PATH / ("node.exe" if IS_WINDOWS else "node") @classproperty @classmethod def NPM_PATH(cls): - """The default path where npm is installed.""" + """The default path where npm is installed. + + Returns: + The default path where npm is installed. + """ return cls.BIN_PATH / "npm"