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(
304304 ] = 2 ,
305305 ) -> Any :
306306 """ 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 ()
309309
310310 stream = open (output , "w" ) if output else sys .stderr
311311 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:
4848 extra_sys_path : Path
4949
5050 @contextmanager
51- def sys_path (self ):
51+ def sys_path (self ) -> str :
5252 """ Context manager to temporarily alter sys.path"""
5353 extra_sys_path = str (self .extra_sys_path ) if self .extra_sys_path else ""
5454 if extra_sys_path :
5555 logger .warning ("Adding %s to sys.path..." , extra_sys_path )
5656 sys .path .insert (0 , extra_sys_path )
57- yield
57+ yield extra_sys_path
5858 if extra_sys_path and sys .path and sys .path [0 ] == extra_sys_path :
5959 logger .warning ("Removing %s from sys.path..." , extra_sys_path )
6060 sys .path .pop (0 )
You can’t perform that action at this time.
0 commit comments