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 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: