From d1240b4dac077debe1b17de47ec0677bd58ef6a0 Mon Sep 17 00:00:00 2001 From: Patrick Arminio Date: Thu, 26 Jun 2025 10:13:14 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Ignore=20mypy=20and=20pytest=20cach?= =?UTF-8?q?es=20when=20deploying?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/fastapi_cloud_cli/commands/deploy.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/fastapi_cloud_cli/commands/deploy.py b/src/fastapi_cloud_cli/commands/deploy.py index adb17fbc..bf149161 100644 --- a/src/fastapi_cloud_cli/commands/deploy.py +++ b/src/fastapi_cloud_cli/commands/deploy.py @@ -35,10 +35,9 @@ def _get_app_name(path: Path) -> str: def _should_exclude_entry(path: Path) -> bool: - if ".venv" in path.parts: - return True + parts_to_exclude = [".venv", "__pycache__", ".mypy_cache", ".pytest_cache"] - if "__pycache__" in path.parts: + if any(part in path.parts for part in parts_to_exclude): return True if path.suffix == ".pyc":