Skip to content

Commit dad708d

Browse files
pre-commit-ci[bot]ZhiyuanChen
authored andcommitted
[pre-commit.ci] pre-commit autoupdate (#23)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/PSF/black: 24.2.0 → 24.4.2](psf/black@24.2.0...24.4.2) - [github.com/PyCQA/flake8: 7.0.0 → 7.1.0](PyCQA/flake8@7.0.0...7.1.0) - [github.com/asottile/pyupgrade: v3.15.1 → v3.16.0](asottile/pyupgrade@v3.15.1...v3.16.0) - [github.com/tox-dev/pyproject-fmt: 1.7.0 → 2.1.4](tox-dev/pyproject-fmt@1.7.0...2.1.4) - [github.com/pre-commit/mirrors-mypy: v1.8.0 → v1.11.0](pre-commit/mirrors-mypy@v1.8.0...v1.11.0) - [github.com/codespell-project/codespell: v2.2.6 → v2.3.0](codespell-project/codespell@v2.2.6...v2.3.0) - [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v4.6.0](pre-commit/pre-commit-hooks@v4.5.0...v4.6.0) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 62eb7d4 commit dad708d

File tree

3 files changed

+26
-28
lines changed

3 files changed

+26
-28
lines changed

.pre-commit-config.yaml

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ default_language_version:
22
python: python3
33
repos:
44
- repo: https://github.com/PSF/black
5-
rev: 24.2.0
5+
rev: 24.4.2
66
hooks:
77
- id: black
88
args: [--safe, --quiet]
@@ -12,31 +12,31 @@ repos:
1212
- id: isort
1313
name: isort
1414
- repo: https://github.com/PyCQA/flake8
15-
rev: 7.0.0
15+
rev: 7.1.0
1616
hooks:
1717
- id: flake8
1818
additional_dependencies:
1919
- flake8-bugbear
2020
- flake8-comprehensions
2121
- flake8-simplify
2222
- repo: https://github.com/asottile/pyupgrade
23-
rev: v3.15.1
23+
rev: v3.16.0
2424
hooks:
2525
- id: pyupgrade
2626
args: [--keep-runtime-typing]
2727
- repo: https://github.com/tox-dev/pyproject-fmt
28-
rev: 1.7.0
28+
rev: 2.1.4
2929
hooks:
3030
- id: pyproject-fmt
3131
- repo: https://github.com/pre-commit/mirrors-mypy
32-
rev: v1.8.0
32+
rev: v1.11.0
3333
hooks:
3434
- id: mypy
3535
files: danling
3636
additional_dependencies:
3737
- types-PyYaml
3838
- repo: https://github.com/codespell-project/codespell
39-
rev: v2.2.6
39+
rev: v2.3.0
4040
hooks:
4141
- id: codespell
4242
- repo: https://github.com/pre-commit/mirrors-prettier
@@ -45,7 +45,7 @@ repos:
4545
- id: prettier
4646
files: danling
4747
- repo: https://github.com/pre-commit/pre-commit-hooks
48-
rev: v4.5.0
48+
rev: v4.6.0
4949
hooks:
5050
- id: check-added-large-files
5151
- id: check-ast

danling/modules/mlp/mlp.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ def __init__(
5050
residual=residual,
5151
)
5252
if linear_output:
53-
layers = [dense(in_features, out_features) for in_features, out_features in zip(features, features[1:-1])]
53+
layers = [dense(in_features, out_features) for in_features, out_features in zip(features, features[1:-1])] # type: ignore[arg-type] # noqa: E501
5454
layers.append(nn.Linear(features[-2], features[-1], bias=bias))
5555
else:
56-
layers = [dense(in_features, out_features) for in_features, out_features in zip(features, features[1:])]
56+
layers = [dense(in_features, out_features) for in_features, out_features in zip(features, features[1:])] # type: ignore[arg-type] # noqa: E501
5757
self.layers = nn.Sequential(*layers)
5858

5959
def forward(self, x):

pyproject.toml

+17-19
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ keywords = [
1414
"Deep Learning",
1515
"Machine Learning",
1616
]
17-
license = {file = "LICENSE"}
17+
license = { file = "LICENSE" }
1818
maintainers = [
19-
{name = "Zhiyuan Chen", email = "this@zyc.ai"},
19+
{ name = "Zhiyuan Chen", email = "this@zyc.ai" },
2020
]
2121
authors = [
22-
{name = "Zhiyuan Chen", email = "this@zyc.ai"},
22+
{ name = "Zhiyuan Chen", email = "this@zyc.ai" },
2323
]
2424
requires-python = ">=3.7"
2525
classifiers = [
@@ -41,34 +41,32 @@ dynamic = [
4141
"version",
4242
]
4343
dependencies = [
44-
'cached-property; python_version < "3.8"',
44+
"cached-property; python_version<'3.8'",
4545
"chanfig>=0.0.96",
4646
"gitpython",
4747
"lazy-imports",
48-
'strenum; python_version < "3.11"',
48+
"strenum; python_version<'3.11'",
4949
"tqdm",
5050
]
51-
[project.optional-dependencies]
52-
jax = [
51+
optional-dependencies.jax = [
5352
"flax",
5453
"jax",
5554
]
56-
tensorflow = [
55+
optional-dependencies.tensorflow = [
5756
"tensorflow",
5857
]
59-
torch = [
58+
optional-dependencies.torch = [
6059
"accelerate",
6160
"torch",
6261
"torcheval",
6362
"torchmetrics",
6463
]
65-
[project.urls]
66-
documentation = "https://danling.org"
67-
homepage = "https://danling.org"
68-
repository = "https://github.com/ZhiyuanChen/DanLing"
64+
urls.documentation = "https://danling.org"
65+
urls.homepage = "https://danling.org"
66+
urls.repository = "https://github.com/ZhiyuanChen/DanLing"
6967

7068
[tool.setuptools]
71-
packages = ["danling"]
69+
packages = [ "danling" ]
7270

7371
[tool.setuptools_scm]
7472
write_to = "danling/_version.py"
@@ -103,18 +101,18 @@ disable = """
103101
[tool.pylint.reports]
104102
output-format = "colorized"
105103

106-
[tool.pytest.ini_options]
107-
addopts = "--doctest-modules --cov"
108-
109104
[tool.pytest]
110105
norecursedirs = "demo/*"
111106

107+
[tool.pytest.ini_options]
108+
addopts = "--doctest-modules --cov"
109+
112110
[tool.coverage.run]
113111
branch = true
114-
include = ["danling/**"]
112+
include = [ "danling/**" ]
115113

116114
[tool.coverage.paths]
117-
source = ["icrawler"]
115+
source = [ "icrawler" ]
118116

119117
[tool.coverage.xml]
120118
output = "coverage.xml"

0 commit comments

Comments
 (0)