Updates all backend, hooks and configures codespell in a slightly easier way (#5336)

This commit is contained in:
Trenton H 2024-01-09 10:30:33 -08:00 committed by GitHub
parent a12e1fae72
commit a7e1299194
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 838 additions and 786 deletions

3
.codespellrc Normal file
View File

@ -0,0 +1,3 @@
[codespell]
write-changes = True
ignore-words-list = criterias,afterall,valeu,ureue,equest,ure

View File

@ -81,7 +81,7 @@ jobs:
console.log(`Found ${result.repository.discussions.nodes.length} open answered discussions`)
for (const discussion of result.repository.discussions.nodes) {
console.log(`Closing dicussion #${discussion.number} (${discussion.id})`)
console.log(`Closing discussion #${discussion.number} (${discussion.id})`)
const addCommentMutation = `mutation($discussion:ID!, $body:String!) {
addDiscussionComment(input:{discussionId:$discussion, body:$body}) {

View File

@ -29,11 +29,10 @@ repos:
- id: check-case-conflict
- id: detect-private-key
- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
rev: v2.2.6
hooks:
- id: codespell
args: ["--write-changes", "--ignore-words-list", "criterias,afterall,valeu,ure"]
exclude: "^src-ui/src/locale/|^src-ui/e2e/|^src/paperless_mail/tests/samples/"
exclude: "(^src-ui/src/locale/)|(^src-ui/e2e/)|(^src/paperless_mail/tests/samples/)"
exclude_types:
- pofile
- json
@ -48,11 +47,11 @@ repos:
exclude: "(^Pipfile\\.lock$)"
# Python hooks
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.1.5'
rev: 'v0.1.11'
hooks:
- id: ruff
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.11.0
rev: 23.12.1
hooks:
- id: black
# Dockerfile hooks

View File

@ -7,7 +7,7 @@ name = "pypi"
dateparser = "~=1.2"
# WARNING: django does not use semver.
# Only patch versions are guaranteed to not introduce breaking changes.
django = "~=4.2.8"
django = "~=4.2.9"
django-auditlog = "*"
django-celery-results = "*"
django-compression-middleware = "*"
@ -57,7 +57,7 @@ zxing-cpp = {version = "*", platform_machine = "== 'x86_64'"}
[dev-packages]
# Linting
black = "==23.11.0"
black = "*"
pre-commit = "*"
ruff = "*"
# Testing

1591
Pipfile.lock generated

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -394,11 +394,6 @@ class Log(models.Model):
class SavedView(ModelWithOwner):
class Meta:
ordering = ("name",)
verbose_name = _("saved view")
verbose_name_plural = _("saved views")
name = models.CharField(_("name"), max_length=128)
show_on_dashboard = models.BooleanField(
@ -416,6 +411,14 @@ class SavedView(ModelWithOwner):
)
sort_reverse = models.BooleanField(_("sort reverse"), default=False)
class Meta:
ordering = ("name",)
verbose_name = _("saved view")
verbose_name_plural = _("saved views")
def __str__(self):
return f"SavedView {self.name}"
class SavedViewFilterRule(models.Model):
RULE_TYPES = [