File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change 1212import sys
1313import typing
1414from datetime import datetime
15+ from os import getcwd
1516from pathlib import Path
1617from types import ModuleType
1718from typing import NamedTuple
@@ -167,11 +168,6 @@ def _check_app_name(config: Config):
167168 config ._app_name_is_valid = True
168169
169170
170- @once
171- def _cwd ():
172- return str (Path .cwd ())
173-
174-
175171def get_app (reload : bool = False ) -> ModuleType :
176172 """Get the app module based on the default config.
177173
@@ -194,7 +190,7 @@ def get_app(reload: bool = False) -> ModuleType:
194190 _check_app_name (config )
195191
196192 module = config .module
197- sys .path .insert (0 , _cwd ())
193+ sys .path .insert (0 , getcwd ()) # noqa: PTH109
198194 app = (
199195 __import__ (module , fromlist = (constants .CompileVars .APP ,))
200196 if not config .app_module
You can’t perform that action at this time.
0 commit comments