Skip to content

Commit 743df98

Browse files
authored
Add pre-commit (#29)
1 parent bc5757f commit 743df98

38 files changed

+132
-102
lines changed

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ jobs:
3030
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
3131
run: |
3232
poetry config pypi-token.pypi $PYPI_TOKEN
33-
poetry publish --build
33+
poetry publish --build

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ site
1313
*.db
1414
.cache
1515
__pycache__/
16-
.pytest_cache/
16+
.pytest_cache/

.pre-commit-config.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v4.3.0
6+
hooks:
7+
- id: check-added-large-files
8+
- id: check-toml
9+
- id: check-yaml
10+
args:
11+
- --unsafe
12+
- id: end-of-file-fixer
13+
- id: trailing-whitespace
14+
- repo: https://github.com/asottile/pyupgrade
15+
rev: v3.2.3
16+
hooks:
17+
- id: pyupgrade
18+
args:
19+
- --py3-plus
20+
- --keep-runtime-typing
21+
- repo: https://github.com/charliermarsh/ruff-pre-commit
22+
rev: v0.0.146
23+
hooks:
24+
- id: ruff
25+
args:
26+
- --fix
27+
- repo: https://github.com/psf/black
28+
rev: 22.10.0
29+
hooks:
30+
- id: black

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Changelog
22

3-
Please check [this page in the documentation](https://jowilf.github.io/sqlalchemy-file/changelog/).
3+
Please check [this page in the documentation](https://jowilf.github.io/sqlalchemy-file/changelog/).

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,5 @@ with Session(engine) as session:
126126
* [filedepot: ](https://github.com/amol-/depot) When I was looking for a library like this, depot was the
127127
best I saw. This project inspired **SQLAlchemy-file** extensively
128128
and some features are implemented the same.
129-
* [sqlalchemy-media: ](https://github.com/pylover/sqlalchemy-media) Another attachment extension for SqlAlchemy
129+
* [sqlalchemy-media: ](https://github.com/pylover/sqlalchemy-media) Another attachment extension for SqlAlchemy
130130
to manage assets which are associated with database models
131-

docs/api/exceptions.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
::: sqlalchemy_file.exceptions.ValidationError
2-
::: sqlalchemy_file.exceptions.SizeValidationError
3-
::: sqlalchemy_file.exceptions.ContentTypeValidationError
4-
::: sqlalchemy_file.exceptions.InvalidImageError
5-
::: sqlalchemy_file.exceptions.DimensionValidationError
6-
::: sqlalchemy_file.exceptions.AspectRatioValidationError
1+
::: sqlalchemy_file.exceptions.ValidationError
2+
::: sqlalchemy_file.exceptions.SizeValidationError
3+
::: sqlalchemy_file.exceptions.ContentTypeValidationError
4+
::: sqlalchemy_file.exceptions.InvalidImageError
5+
::: sqlalchemy_file.exceptions.DimensionValidationError
6+
::: sqlalchemy_file.exceptions.AspectRatioValidationError

docs/api/file.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
::: sqlalchemy_file.base.BaseFile
2-
::: sqlalchemy_file.file.File
2+
::: sqlalchemy_file.file.File

docs/api/processors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
::: sqlalchemy_file.processors.Processor
2-
::: sqlalchemy_file.processors.ThumbnailGenerator
2+
::: sqlalchemy_file.processors.ThumbnailGenerator

docs/api/storage-manager.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
::: sqlalchemy_file.storage.StorageManager
1+
::: sqlalchemy_file.storage.StorageManager

docs/api/types.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
::: sqlalchemy_file.types.FileField
2-
::: sqlalchemy_file.types.ImageField
1+
::: sqlalchemy_file.types.FileField
2+
::: sqlalchemy_file.types.ImageField

0 commit comments

Comments
 (0)