Skip to content

Commit 1aebb9e

Browse files
committed
lint fixes
1 parent d4b144c commit 1aebb9e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/fastapi_cli/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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)

src/fastapi_cli/discover.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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)

0 commit comments

Comments
 (0)