Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiask committed Oct 31, 2024
1 parent a0b95fe commit 0053829
Show file tree
Hide file tree
Showing 25 changed files with 291 additions and 371 deletions.
27 changes: 16 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
exclude: ".yarn/|yarn.lock|package.json|conf/strings.js"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-added-large-files
- id: check-builtin-literals
Expand All @@ -28,36 +28,41 @@ repos:
name: prettier
entry: npx [email protected] --no-semi --write
language: system
types_or: [css, scss]
types_or: [scss]
require_serial: true
- repo: https://github.com/adamchainz/django-upgrade
rev: 1.21.0
rev: 1.22.1
hooks:
- id: django-upgrade
args: [--target-version, "5.0"]
args: [--target-version, "5.1"]
- repo: https://github.com/adamchainz/djade-pre-commit
rev: "1.3.2"
hooks:
- id: djade
args: [--target-version, "5.1"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.6.4"
rev: "v0.7.1"
hooks:
- id: ruff
args: [--unsafe-fixes]
- id: ruff-format
- repo: https://github.com/tox-dev/pyproject-fmt
rev: 2.2.1
rev: v2.5.0
hooks:
- id: pyproject-fmt
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.19
rev: v0.22
hooks:
- id: validate-pyproject
- repo: https://github.com/biomejs/pre-commit
rev: "v0.4.0"
rev: "v0.5.0"
hooks:
- id: biome-check
additional_dependencies: ["@biomejs/biome@1.8.3"]
additional_dependencies: ["@biomejs/biome@1.9.4"]
args: [--unsafe]
types_or: [javascript, json]
types_or: [css, javascript, json]
- repo: https://github.com/boidolr/pre-commit-images
rev: v1.8.1
rev: v1.8.2
hooks:
- id: optimize-avif
- id: optimize-jpg
Expand Down
4 changes: 2 additions & 2 deletions app/templates/404.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{% extends "base.html" %}

{% load static i18n %}
{% load i18n static %}

{% block title %}{% translate "This page was not found" %}{% endblock %}

{% block content %}
<h1>{% translate "404: Sorry, we could not find the page you requested." %}</h1>
{% endblock %}
{% endblock content %}
2 changes: 1 addition & 1 deletion app/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
{% block body %}
<main class="main">
<div class="container flow">
{% block content %}{% endblock content %}
{% block content %}{% endblock %}
</div>
</main>
{% endblock body %}
Expand Down
2 changes: 1 addition & 1 deletion app/templates/projects/catalog.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@ <h3>{% translate 'Entries' %} <small>{{ start }} - {{ end }} / {{ total }}</smal
{% endif %}

</div>
{% endblock %}
{% endblock content %}
2 changes: 1 addition & 1 deletion app/templates/projects/project.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ <h2>{% translate 'CLI configuration' %}</h2>

<h2>{% translate 'Latest activity' %}</h2>
{% for a in activity %}{{ a.as_html }}{% empty %}<p>{% translate 'None' %}</p>{% endfor %}
{% endblock %}
{% endblock content %}
2 changes: 1 addition & 1 deletion app/templates/projects/projects.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ <h2>{% translate 'Account' %}</h2>
{% endif %}
</form>

{% endblock %}
{% endblock content %}
4 changes: 2 additions & 2 deletions app/templates/registration/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ <h1 class="login__title">Traduire</h1>
</div>
</div>
</main>
{% endblock %}
{% endblock body %}

{% block footer %}{% endblock footer %}
{% block footer %}{% endblock %}
2 changes: 1 addition & 1 deletion app/templates/registration/password_change_done.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ <h1 class="login__title">Traduire</h1>
<h2 class="login__subtitle">{% translate "Change password" %}</h2>
<p>{% translate 'Your password was changed.' %}</p>
</form>
{% endblock %}
{% endblock content %}
2 changes: 1 addition & 1 deletion app/templates/registration/password_change_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ <h2 class="login__subtitle">{% translate "Change password" %}</h2>
{{ form|adapt_rendering }}
<button class="button" type="submit">{% translate "Submit" %}</button>
</form>
{% endblock %}
{% endblock content %}
2 changes: 1 addition & 1 deletion app/templates/registration/password_reset_complete.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ <h2 class="login__subtitle">{% translate "Reset password" %}</h2>
<p>{% translate "Your password has been set. You may go ahead and log in now." %}</p>
<p><a href="{{ login_url }}">{% translate 'Log in' %}</a></p>
</form>
{% endblock %}
{% endblock content %}
2 changes: 1 addition & 1 deletion app/templates/registration/password_reset_confirm.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ <h2 class="login__subtitle">{% translate "Reset password" %}</h2>
<p>{% translate "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}</p>
{% endif %}
</form>
{% endblock %}
{% endblock content %}
2 changes: 1 addition & 1 deletion app/templates/registration/password_reset_done.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ <h2 class="login__subtitle">{% translate "Reset password" %}</h2>
<p>{% translate 'We’ve emailed you instructions for setting your password, if an account exists with the email you entered. You should receive them shortly.' %}</p>
<p>{% translate 'If you don’t receive an email, please make sure you’ve entered the address you registered with, and check your spam folder.' %}</p>
</form>
{% endblock %}
{% endblock content %}
2 changes: 1 addition & 1 deletion app/templates/registration/password_reset_email.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
{% translate "Please go to the following page and choose a new password:" %}
{% block reset_link %}
{{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %}
{% endblock %}
{% endblock reset_link %}
{% translate 'Your username, in case you’ve forgotten:' %} {{ user.get_username }}

{% translate "Thanks for using our site!" %}
Expand Down
2 changes: 1 addition & 1 deletion app/templates/registration/password_reset_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ <h2 class="login__subtitle">{% translate "Reset password" %}</h2>
{{ form|adapt_rendering }}
<button class="button" type="submit">{% translate "Submit" %}</button>
</form>
{% endblock %}
{% endblock content %}
4 changes: 2 additions & 2 deletions app/templates/registration/register.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ <h1 class="login__title">Traduire</h1>
</div>
</div>
</main>
{% endblock %}
{% endblock body %}

{% block footer %}{% endblock footer %}
{% block footer %}{% endblock %}
52 changes: 39 additions & 13 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,58 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"organizeImports": {
"enabled": false
},
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"formatter": {
"enabled": true,
"indentStyle": "space",
"indentWidth": 2
"useEditorconfig": true
},
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"a11y": {
"noSvgWithoutTitle": "off"
},
"complexity": {
"noUselessStringConcat": "error",
"noUselessUndefinedInitialization": "error"
},
"correctness": {
"noUndeclaredVariables": "error",
"noUnknownMediaFeatureName": "off",
"noUnusedFunctionParameters": "error",
"noUnusedImports": "error",
"noUnusedVariables": "error",
"useArrayLiterals": "error",
"useHookAtTopLevel": "error"
},
"nursery": {
"noDuplicateProperties": "error",
"noUnknownTypeSelector": "error",
"useCollapsedIf": "error"
},
"security": {
"noDangerouslySetInnerHtml": "warn"
},
"style": {
"noParameterAssign": "off",
"useConsistentBuiltinInstantiation": "error",
"useForOf": "warn"
},
"suspicious": {
"noAssignInExpressions": "off"
"noArrayIndexKey": "warn",
"noAssignInExpressions": "off",
"useErrorMessage": "error"
}
}
},
"javascript": {
"formatter": {
"semicolons": "asNeeded"
}
},
"globals": []
},
"css": {
"json": {
"formatter": {
"enabled": true
},
"linter": {
"enabled": true
"enabled": false
}
}
}
1 change: 1 addition & 0 deletions cli/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ requires-python = ">=3.12"
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dependencies = [
"click",
Expand Down
2 changes: 1 addition & 1 deletion fabfile.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fh_fablib as fl


fl.require("1.0.20240904")
fl.require("1.0.20241002")
fl.config.update(
domain="traduire.feinheit.dev",
branch="main",
Expand Down
1 change: 0 additions & 1 deletion frontend/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ onReady(() => {
e.target.form.requestSubmit()
}

const entry = e.target.closest(".entry")
if (e.target.closest(".entry__msgstr")) {
qs(".entry__fuzzy input", e.target.closest(".entry")).checked = false
}
Expand Down
4 changes: 1 addition & 3 deletions frontend/styles/buttons.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ button {
padding: 7px 23px;
border-radius: 1.5rem;
white-space: nowrap;
transition:
color 200ms ease-in-out,
background-color 200ms ease-in-out,
transition: color 200ms ease-in-out, background-color 200ms ease-in-out,
border-color 200ms ease-in-out;

color: var(--button-fg);
Expand Down
10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@
"semi": false
},
"dependencies": {
"@rspack/cli": "^1.0.5",
"@rspack/core": "^1.0.5",
"@rspack/cli": "^1.0.14",
"@rspack/core": "^1.0.14",
"@swc/helpers": "^0.5.13",
"autoprefixer": "^10.4.20",
"babel-loader": "^9.2.1",
"core-js": "^3.38.1",
"html-webpack-plugin": "^5.6.0",
"html-webpack-plugin": "^5.6.3",
"postcss": "^8.4.47",
"postcss-loader": "^8.1.1",
"postcss-nesting": "^13.0.0"
"postcss-nesting": "^13.0.1"
}
}
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,7 @@ omit = [
[tool.coverage.report]
skip_covered = true
show_missing = true

[tool.pyright]
venvPath = ".venv"
venv = "."
24 changes: 12 additions & 12 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
# AUTOGENERATED, DO NOT EDIT

anyio==4.4.0
anyio==4.6.2.post1
asgiref==3.8.1
blacknoise==1.0.2
blacknoise==1.1.0
certifi==2024.8.30
charset-normalizer==3.3.2
charset-normalizer==3.4.0
click==8.1.7
coverage==7.6.1
django==5.1.1
coverage==7.6.4
django==5.1.2
django-authlib==0.17.1
django-canonical-domain==0.11.0
django-debug-toolbar==5.0.0a0
django-ratelimit==4.1.0
granian==1.6.0
granian==1.6.3
idna==3.10
oauthlib==3.2.2
polib==1.2.0
psycopg==3.2.2
psycopg-binary==3.2.2
psycopg==3.2.3
psycopg-binary==3.2.3
python-dateutil==2.9.0.post0
requests==2.32.3
requests-oauthlib==2.0.0
sentry-sdk==2.14.0
sentry-sdk==2.17.0
six==1.16.0
sniffio==1.3.1
speckenv==6.2
sqlparse==0.5.1
starlette==0.38.5
time-machine==2.15.0
starlette==0.41.2
time-machine==2.16.0
typing-extensions==4.12.2
urllib3==2.2.3
uvloop==0.21.0b1
uvloop==0.21.0
7 changes: 1 addition & 6 deletions rspack.library.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ module.exports = (PRODUCTION) => {
},
externalHelpers: true,
},
env: {
targets: "Chrome >= 48", // browser compatibility
},
},
type: "javascript/auto",
}
Expand All @@ -96,9 +93,6 @@ module.exports = (PRODUCTION) => {
},
externalHelpers: true,
},
env: {
targets: "Chrome >= 48", // browser compatibility
},
},
type: "javascript/auto",
}
Expand Down Expand Up @@ -141,6 +135,7 @@ module.exports = (PRODUCTION) => {
},
plugins: truthy(htmlSingleChunkPlugin()),
experiments: { css: true },
target: "browserslist:defaults",
},
devServer(proxySettings) {
return {
Expand Down
Loading

0 comments on commit 0053829

Please sign in to comment.