Skip to content

Commit 98c15fb

Browse files
Drop support for end-of-life Python releases + update pre-commit hooks (#12)
2 parents 13f47ce + 5f79925 commit 98c15fb

5 files changed

Lines changed: 20 additions & 10 deletions

File tree

.pre-commit-config.yaml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ default_language_version:
33

44
repos:
55
- repo: https://github.com/pre-commit/pre-commit-hooks
6-
rev: v5.0.0
6+
rev: v6.0.0
77
hooks:
88
- id: trailing-whitespace
99
- id: end-of-file-fixer
@@ -19,27 +19,32 @@ repos:
1919

2020
# python linting and code formatting
2121
- repo: https://github.com/astral-sh/ruff-pre-commit
22-
rev: v0.11.0
22+
rev: v0.15.0
2323
hooks:
24-
- id: ruff
24+
- id: ruff-check
2525
args: [--fix]
2626
- id: ruff-format
2727

28+
# python docstring formatting
29+
- repo: https://github.com/PyCQA/docformatter
30+
rev: v1.7.8
31+
hooks:
32+
- id: docformatter
33+
args: [--in-place]
34+
2835
# jupyter notebook cell output clearing
2936
- repo: https://github.com/kynan/nbstripout
30-
rev: 0.8.1
37+
rev: 0.9.1
3138
hooks:
3239
- id: nbstripout
3340

3441
# md formatting
3542
- repo: https://github.com/hukkin/mdformat
36-
rev: 0.7.22
43+
rev: 1.0.0
3744
hooks:
3845
- id: mdformat
3946
args: ["--number"]
4047
additional_dependencies:
4148
- mdformat-gfm
42-
- mdformat-frontmatter
4349
- mdformat-footnote
4450
- mdformat-gfm-alerts
45-
- mdformat-tables

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ channels:
33
- conda-forge
44
- defaults
55
dependencies:
6-
- python>=3.8
6+
- python>=3.10
77
- pip
88
- setuptools
99
- pip:

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@ line-length = 120
33

44
[tool.ruff.lint.pydocstyle]
55
convention = "google"
6+
7+
[tool.docformatter]
8+
recursive = true
9+
wrap-summaries=120
10+
wrap-descriptions=120

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def load_long_description(): # noqa: D103
5858
packages=find_packages(),
5959
long_description=load_long_description(),
6060
long_description_content_type="text/markdown",
61-
python_requires=">=3.8",
61+
python_requires=">=3.10",
6262
setup_requires=[],
6363
install_requires=load_requirements(),
6464
extras_require=extras,

src/data/transforms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
class NormalizeSample(torch.nn.Module):
7-
"""Normalize a tensor image w.r.t. to its mean and standard deviation.
7+
"""Normalize a tensor image with respect to its mean and standard deviation.
88
99
Args:
1010
inplace: Whether to make this operation in-place.

0 commit comments

Comments
 (0)