Skip to content

Commit a7e1299

Browse files
authored
Updates all backend, hooks and configures codespell in a slightly easier way (paperless-ngx#5336)
1 parent a12e1fa commit a7e1299

File tree

7 files changed

+838
-786
lines changed

7 files changed

+838
-786
lines changed

.codespellrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[codespell]
2+
write-changes = True
3+
ignore-words-list = criterias,afterall,valeu,ureue,equest,ure

.github/workflows/repo-maintenance.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
console.log(`Found ${result.repository.discussions.nodes.length} open answered discussions`)
8282
8383
for (const discussion of result.repository.discussions.nodes) {
84-
console.log(`Closing dicussion #${discussion.number} (${discussion.id})`)
84+
console.log(`Closing discussion #${discussion.number} (${discussion.id})`)
8585
8686
const addCommentMutation = `mutation($discussion:ID!, $body:String!) {
8787
addDiscussionComment(input:{discussionId:$discussion, body:$body}) {

.pre-commit-config.yaml

+4-5
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,10 @@ repos:
2929
- id: check-case-conflict
3030
- id: detect-private-key
3131
- repo: https://github.com/codespell-project/codespell
32-
rev: v2.2.4
32+
rev: v2.2.6
3333
hooks:
3434
- id: codespell
35-
args: ["--write-changes", "--ignore-words-list", "criterias,afterall,valeu,ure"]
36-
exclude: "^src-ui/src/locale/|^src-ui/e2e/|^src/paperless_mail/tests/samples/"
35+
exclude: "(^src-ui/src/locale/)|(^src-ui/e2e/)|(^src/paperless_mail/tests/samples/)"
3736
exclude_types:
3837
- pofile
3938
- json
@@ -48,11 +47,11 @@ repos:
4847
exclude: "(^Pipfile\\.lock$)"
4948
# Python hooks
5049
- repo: https://github.com/astral-sh/ruff-pre-commit
51-
rev: 'v0.1.5'
50+
rev: 'v0.1.11'
5251
hooks:
5352
- id: ruff
5453
- repo: https://github.com/psf/black-pre-commit-mirror
55-
rev: 23.11.0
54+
rev: 23.12.1
5655
hooks:
5756
- id: black
5857
# Dockerfile hooks

Pipfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name = "pypi"
77
dateparser = "~=1.2"
88
# WARNING: django does not use semver.
99
# Only patch versions are guaranteed to not introduce breaking changes.
10-
django = "~=4.2.8"
10+
django = "~=4.2.9"
1111
django-auditlog = "*"
1212
django-celery-results = "*"
1313
django-compression-middleware = "*"
@@ -57,7 +57,7 @@ zxing-cpp = {version = "*", platform_machine = "== 'x86_64'"}
5757

5858
[dev-packages]
5959
# Linting
60-
black = "==23.11.0"
60+
black = "*"
6161
pre-commit = "*"
6262
ruff = "*"
6363
# Testing

Pipfile.lock

+819-772
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/changelog.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3277,7 +3277,7 @@ primarily.
32773277
[OCRmyPDF](https://github.com/jbarlow83/OCRmyPDF) to perform OCR
32783278
on documents. It still uses tesseract under the hood, but the
32793279
PDF parser of Paperless has changed considerably and will behave
3280-
different for some douments.
3280+
different for some documents.
32813281
- OCRmyPDF creates archived PDF/A documents with embedded text
32823282
that can be selected in the front end.
32833283
- Paperless stores archived versions of documents alongside with

src/documents/models.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -394,11 +394,6 @@ def __str__(self):
394394

395395

396396
class SavedView(ModelWithOwner):
397-
class Meta:
398-
ordering = ("name",)
399-
verbose_name = _("saved view")
400-
verbose_name_plural = _("saved views")
401-
402397
name = models.CharField(_("name"), max_length=128)
403398

404399
show_on_dashboard = models.BooleanField(
@@ -416,6 +411,14 @@ class Meta:
416411
)
417412
sort_reverse = models.BooleanField(_("sort reverse"), default=False)
418413

414+
class Meta:
415+
ordering = ("name",)
416+
verbose_name = _("saved view")
417+
verbose_name_plural = _("saved views")
418+
419+
def __str__(self):
420+
return f"SavedView {self.name}"
421+
419422

420423
class SavedViewFilterRule(models.Model):
421424
RULE_TYPES = [

0 commit comments

Comments
 (0)