Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#37)
Browse files Browse the repository at this point in the history
updates:
- [github.com/tox-dev/pyproject-fmt: 2.2.1 → 2.2.4](tox-dev/pyproject-fmt@2.2.1...2.2.4)
- [github.com/PSF/black: 24.8.0 → 24.10.0](psf/black@24.8.0...24.10.0)
- [github.com/asottile/pyupgrade: v3.17.0 → v3.18.0](asottile/pyupgrade@v3.17.0...v3.18.0)
- [github.com/tox-dev/pyproject-fmt: 2.2.4 → 2.3.1](tox-dev/pyproject-fmt@2.2.4...2.3.1)
- [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](pre-commit/pre-commit-hooks@v4.6.0...v5.0.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored and ZhiyuanChen committed Dec 13, 2024
1 parent 7b5fb67 commit fc5a167
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ default_language_version:
python: python3
repos:
- repo: https://github.com/PSF/black
rev: 24.8.0
rev: 24.10.0
hooks:
- id: black
args: [--safe, --quiet]
Expand All @@ -20,16 +20,16 @@ repos:
- flake8-comprehensions
- flake8-simplify
- repo: https://github.com/asottile/pyupgrade
rev: v3.17.0
rev: v3.19.0
hooks:
- id: pyupgrade
args: [--keep-runtime-typing]
- repo: https://github.com/tox-dev/pyproject-fmt
rev: 2.2.1
rev: v2.5.0
hooks:
- id: pyproject-fmt
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.2
rev: v1.13.0
hooks:
- id: mypy
files: chanfig
Expand All @@ -46,7 +46,7 @@ repos:
- id: prettier
files: chanfig
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-ast
Expand Down
2 changes: 1 addition & 1 deletion chanfig/flat_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def to_dict(obj: Any, flatten: bool = False) -> Mapping | Sequence | Set:
if isinstance(obj, Variable):
return obj.value
if is_dataclass(obj):
return asdict(obj) # type: ignore[call-overload]
return asdict(obj) # type: ignore[arg-type]
if hasattr(obj, "to_dict"):
return obj.to_dict()
return obj
Expand Down
2 changes: 1 addition & 1 deletion chanfig/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def add_config_argument(self, key, value: Any | None = None, dtype: type | None
if isinstance(value, Variable):
dtype = value._type or value.dtype # pylint: disable=W0212
elif isinstance(value, Field):
dtype = value.type
dtype = value.type # type: ignore[assignment]
elif value is not None:
dtype = type(value)
if _should_collect_from_parameters(dtype):
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dynamic = [
Expand Down

0 comments on commit fc5a167

Please sign in to comment.