From c72aff32a7ccc923964006bbd0e116264e90c4b7 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 17:58:21 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v5.0.0) - [github.com/codespell-project/codespell: v2.2.6 → v2.3.0](https://github.com/codespell-project/codespell/compare/v2.2.6...v2.3.0) - [github.com/editorconfig-checker/editorconfig-checker.python: 2.7.3 → 3.0.3](https://github.com/editorconfig-checker/editorconfig-checker.python/compare/2.7.3...3.0.3) - [github.com/rhysd/actionlint: v1.6.27 → v1.7.6](https://github.com/rhysd/actionlint/compare/v1.6.27...v1.7.6) - [github.com/executablebooks/mdformat: 0.7.17 → 0.7.21](https://github.com/executablebooks/mdformat/compare/0.7.17...0.7.21) - [github.com/DavidAnson/markdownlint-cli2: v0.12.1 → v0.17.1](https://github.com/DavidAnson/markdownlint-cli2/compare/v0.12.1...v0.17.1) - [github.com/astral-sh/ruff-pre-commit: v0.2.1 → v0.8.6](https://github.com/astral-sh/ruff-pre-commit/compare/v0.2.1...v0.8.6) - [github.com/kumaraditya303/mirrors-pyright: v1.1.350 → v1.1.391](https://github.com/kumaraditya303/mirrors-pyright/compare/v1.1.350...v1.1.391) --- .pre-commit-config.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ac4e71d..e3b4b27 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,7 @@ exclude: ^templates/ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v5.0.0 hooks: - id: check-added-large-files - id: fix-byte-order-marker @@ -27,7 +27,7 @@ repos: hooks: - id: remove-crlf - repo: https://github.com/codespell-project/codespell - rev: v2.2.6 + rev: v2.3.0 hooks: - id: codespell additional_dependencies: @@ -39,7 +39,7 @@ repos: args: - --msg-filename - repo: https://github.com/editorconfig-checker/editorconfig-checker.python - rev: 2.7.3 + rev: 3.0.3 hooks: - id: editorconfig-checker - repo: https://github.com/jumanjihouse/pre-commit-hooks @@ -47,7 +47,7 @@ repos: hooks: - id: check-mailmap - repo: https://github.com/rhysd/actionlint - rev: v1.6.27 + rev: v1.7.6 hooks: - id: actionlint - repo: https://github.com/adrienverge/yamllint @@ -55,7 +55,7 @@ repos: hooks: - id: yamllint - repo: https://github.com/executablebooks/mdformat - rev: 0.7.17 + rev: 0.7.21 hooks: - id: mdformat additional_dependencies: @@ -69,7 +69,7 @@ repos: - mdformat-config - mdformat-web - repo: https://github.com/DavidAnson/markdownlint-cli2 - rev: v0.12.1 + rev: v0.17.1 hooks: - id: markdownlint-cli2 additional_dependencies: @@ -80,12 +80,12 @@ repos: - id: update-CITATION.cff - id: update-pyproject.toml - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.2.1 + rev: v0.8.6 hooks: - id: ruff - id: ruff-format - repo: https://github.com/kumaraditya303/mirrors-pyright - rev: v1.1.350 + rev: v1.1.391 hooks: - id: pyright - repo: https://github.com/nix-community/nixpkgs-fmt From 3e84108d729611344535770abe83632993e8cf1b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 17:59:12 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/repl_python_wakatime/hooks/codestats.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/repl_python_wakatime/hooks/codestats.py b/src/repl_python_wakatime/hooks/codestats.py index 26d0654..e394edd 100644 --- a/src/repl_python_wakatime/hooks/codestats.py +++ b/src/repl_python_wakatime/hooks/codestats.py @@ -137,10 +137,12 @@ def send_xp(self) -> None: # after lock is released we can send the payload utc_now = datetime.now().astimezone().isoformat() - pulse_json = json.dumps({ - "coded_at": f"{utc_now}", - "xps": xp_list, - }).encode("utf-8") + pulse_json = json.dumps( + { + "coded_at": f"{utc_now}", + "xps": xp_list, + } + ).encode("utf-8") req = Request(url=self.url, data=pulse_json, headers=headers) error = "" try: