small perf imrpovements

This commit is contained in:
Matthias Mair 2024-08-20 00:06:13 +02:00
parent 3e5432db47
commit c197358ce4
No known key found for this signature in database
GPG Key ID: A593429DDA23B66A
3 changed files with 3 additions and 2 deletions

View File

@ -24,6 +24,7 @@ repos:
- id: ruff - id: ruff
args: [ args: [
--fix, --fix,
--unsafe-fixes,
--preview --preview
] ]
- repo: https://github.com/astral-sh/uv-pre-commit - repo: https://github.com/astral-sh/uv-pre-commit

View File

@ -200,7 +200,7 @@ class ScheduleMixin:
try: try:
from django_q.models import Schedule from django_q.models import Schedule
for key, _ in self.scheduled_tasks.items(): for key in self.scheduled_tasks:
task_name = self.get_task_name(key) task_name = self.get_task_name(key)
try: try:

View File

@ -200,7 +200,7 @@ class TestTestResultMigration(MigratorTestCase):
) )
# Create some test results # Create some test results
for _k, v in self.test_keys.items(): for v in self.test_keys.values():
StockItemTestResult.objects.create( StockItemTestResult.objects.create(
stock_item=si, test=v, result=True, value=f'Result: {ii} : {jj}' stock_item=si, test=v, result=True, value=f'Result: {ii} : {jj}'
) )