From f8a4d469ef1b1e65ea37955268ed02b4cc2d85fd Mon Sep 17 00:00:00 2001 From: kai Date: Sun, 20 Oct 2024 20:06:50 -0400 Subject: [PATCH] Stop syncing location logs due to picklepete/pyicloud#456\n\nhttps://github.com/picklepete/pyicloud/issues/456 --- fly.toml | 3 +++ icloudctl.py | 2 +- lefthook.yml | 6 +++--- pyproject.toml | 3 ++- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/fly.toml b/fly.toml index 4936bd27..8ba74be0 100644 --- a/fly.toml +++ b/fly.toml @@ -3,6 +3,9 @@ primary_region = "den" kill_signal = "SIGINT" swap_size_mb = 1024 +[env] + LOCATION_SYNC_DISABLED = "true" + [experimental] auto_rollback = true diff --git a/icloudctl.py b/icloudctl.py index 964fe1b7..5f342ff6 100644 --- a/icloudctl.py +++ b/icloudctl.py @@ -52,7 +52,7 @@ def login(): and cause.reason == "Missing apple_id field" ): return {"error": "Bad login"}, 400 - raise error + return {"error": str(message)}, 500 except Exception as error: return {"error": str(error)}, 500 diff --git a/lefthook.yml b/lefthook.yml index 4a163bc0..5f3c0603 100644 --- a/lefthook.yml +++ b/lefthook.yml @@ -27,7 +27,7 @@ check: tags: py check-black: files: *modified-files - run: poetry run black --check --force-exclude {files} + run: poetry run black --check {files} glob: "*.py" tags: py @@ -55,7 +55,7 @@ fix: tags: py check-black: files: *modified-files - run: poetry run black --force-exclude {files} + run: poetry run black /node_modules/ {files} glob: "*.py" tags: py @@ -93,7 +93,7 @@ pre-commit: glob: "*.py" tags: py check-black: - run: poetry run black --check --force-exclude {staged_files} + run: poetry run black --check {staged_files} glob: "*.py" tags: py diff --git a/pyproject.toml b/pyproject.toml index 2c169b6b..08109a31 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,8 @@ exclude = "(__pycache__|node_modules|^vendor|^.husky|^tmp|^storage|^public/dist-\\w+)" [tool.black] - extend-exclude = "(__pycache__|node_modules|^/vendor|^/.husky|^/tmp|^/storage|^/public/dist-\\w+)" + extend-exclude = "(__pycache__|node_modules|^/vendor|^/tmp|^/storage|^/public/dist-\\w+)" + force-exclude = "(__pycache__|node_modules|^/vendor|^/tmp|^/storage|^/public/dist-\\w+)" [build-system] requires = ["poetry-core"]