Skip to content

Commit e5d3552

Browse files
authored
cache path cwd (#5948)
* cache path cwd * use get cwd for maximum perf
1 parent 982d2fa commit e5d3552

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

reflex/utils/prerequisites.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
import sys
1313
import typing
1414
from datetime import datetime
15+
from os import getcwd
1516
from pathlib import Path
1617
from types import ModuleType
1718
from typing import NamedTuple
@@ -189,7 +190,7 @@ def get_app(reload: bool = False) -> ModuleType:
189190
_check_app_name(config)
190191

191192
module = config.module
192-
sys.path.insert(0, str(Path.cwd()))
193+
sys.path.insert(0, getcwd()) # noqa: PTH109
193194
app = (
194195
__import__(module, fromlist=(constants.CompileVars.APP,))
195196
if not config.app_module

0 commit comments

Comments
 (0)