Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
6 changes: 5 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
6 changes: 3 additions & 3 deletions toml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

__all__ = [
"TOMLError",
"loads",
"load",
"dumps",
"dump",
"dumps",
"load",
"loads",
]
3 changes: 3 additions & 0 deletions toml/_dotty.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
2 changes: 1 addition & 1 deletion toml/_toml.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
Loading