File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -304,8 +304,8 @@ def schema(
304
304
] = 2 ,
305
305
) -> Any :
306
306
""" Generate schema """
307
- app = get_app (path = path , app_name = app )
308
- schema = app .openapi ()
307
+ fastapi_app = get_app (path = path , app_name = app )
308
+ schema = fastapi_app .openapi ()
309
309
310
310
stream = open (output , "w" ) if output else sys .stderr
311
311
json .dump (schema , stream , indent = indent if indent > 0 else None )
Original file line number Diff line number Diff line change @@ -48,13 +48,13 @@ class ModuleData:
48
48
extra_sys_path : Path
49
49
50
50
@contextmanager
51
- def sys_path (self ):
51
+ def sys_path (self ) -> str :
52
52
""" Context manager to temporarily alter sys.path"""
53
53
extra_sys_path = str (self .extra_sys_path ) if self .extra_sys_path else ""
54
54
if extra_sys_path :
55
55
logger .warning ("Adding %s to sys.path..." , extra_sys_path )
56
56
sys .path .insert (0 , extra_sys_path )
57
- yield
57
+ yield extra_sys_path
58
58
if extra_sys_path and sys .path and sys .path [0 ] == extra_sys_path :
59
59
logger .warning ("Removing %s from sys.path..." , extra_sys_path )
60
60
sys .path .pop (0 )
You can’t perform that action at this time.
0 commit comments