From 0bf5c8555169cb619d49feff23e4f418c1f94005 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 22:09:59 +0000 Subject: [PATCH 1/3] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/fsfe/reuse-tool: v4.0.3 → v6.2.0](https://github.com/fsfe/reuse-tool/compare/v4.0.3...v6.2.0) - [github.com/pre-commit/pre-commit-hooks: v5.0.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v5.0.0...v6.0.0) - [github.com/astral-sh/ruff-pre-commit: v0.7.1 → v0.16.4](https://github.com/astral-sh/ruff-pre-commit/compare/v0.7.1...v0.16.4) - [github.com/pre-commit/mirrors-mypy: v1.13.0 → v2.3.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.13.0...v2.3.1) --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 58856e6..391a590 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,18 +4,18 @@ repos: - repo: https://github.com/fsfe/reuse-tool - rev: v4.0.3 + rev: v6.2.0 hooks: - id: reuse - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: check-yaml - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.7.1 + rev: v0.16.4 hooks: # Run the linter. - id: ruff @@ -24,6 +24,6 @@ repos: # Run the formatter. - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.13.0 + rev: v2.3.1 hooks: - id: mypy From a19b63c4598dd5c5ea09edc344dd1b469b806435 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 24 Aug 2026 22:10:14 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- toml/__init__.py | 6 +++--- toml/_toml.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/toml/__init__.py b/toml/__init__.py index e1d69e2..ae4acbd 100644 --- a/toml/__init__.py +++ b/toml/__init__.py @@ -12,8 +12,8 @@ __all__ = [ "TOMLError", - "loads", - "load", - "dumps", "dump", + "dumps", + "load", + "loads", ] diff --git a/toml/_toml.py b/toml/_toml.py index 9b400fa..b2c4e7e 100644 --- a/toml/_toml.py +++ b/toml/_toml.py @@ -330,7 +330,7 @@ def try_int(cls, string: str) -> int | None: "b": 2, "o": 8, "x": 16, - }.get(string[1], None) + }.get(string[1]) if base is None: msg = "Invalid number." From 4582b6e2c29e082b49bf527d7113e9e179f8c27c Mon Sep 17 00:00:00 2001 From: "Pablo Martinez (@elpekenin)" Date: Thu, 27 Aug 2026 17:09:11 +0200 Subject: [PATCH 3/3] chore: ruff linting --- pyproject.toml | 6 +++++- toml/_dotty.py | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index fdbe19a..3ab729e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,6 +46,10 @@ optional-dependencies = {optional = {file = ["optional_requirements.txt"]}} [tool.ruff.lint] select = ["ALL"] +ignore = [ + "PYI063", # CircuitPython does not support PEP484 + "CPY001", # don't want to add copyright headers +] -[tool.ruff.extend-per-file-ignores] +[tool.ruff.lint.extend-per-file-ignores] "tests.py" = ["PT"] diff --git a/toml/_dotty.py b/toml/_dotty.py index 4e391dc..8ece6ac 100644 --- a/toml/_dotty.py +++ b/toml/_dotty.py @@ -161,3 +161,6 @@ def __delitem__(self, __key: object) -> None: # if table is empty after that, remove it too if len(table) == 0 and parent_table: parent_table.pop(keys[-1]) + + def __hash__(self) -> int: + return hash(self.data)