Skip to content

Commit

Permalink
Merge pull request #1183 from rdmorganiser/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
build(pre-commit): pre-commit autoupdate by ci
  • Loading branch information
MyPyDavid authored Nov 7, 2024
2 parents de082d4 + e5fc8a0 commit e79a49d
Show file tree
Hide file tree
Showing 27 changed files with 69 additions and 69 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ repos:
exclude: \.dot$
- id: debug-statements
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.6.9
rev: v0.7.2
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v9.12.0
rev: v9.14.0
hooks:
- id: eslint
args: [--fix, --color]
Expand All @@ -36,7 +36,7 @@ repos:
- [email protected]
- [email protected]
- repo: https://github.com/crate-ci/typos
rev: v1.26.0
rev: v1.27.0
hooks:
- id: typos
exclude: |
Expand Down
4 changes: 2 additions & 2 deletions rdmo/conditions/tests/test_validator_locked.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from django.core.exceptions import ValidationError

from rest_framework.exceptions import ValidationError as RestFameworkValidationError
from rest_framework.exceptions import ValidationError as RestFrameworkValidationError

from ..models import Condition
from ..serializers.v1 import ConditionSerializer
Expand Down Expand Up @@ -93,7 +93,7 @@ def test_serializer_update_error(db):
validator = ConditionLockedValidator()
serializer = ConditionSerializer(instance=condition)

with pytest.raises(RestFameworkValidationError):
with pytest.raises(RestFrameworkValidationError):
validator({
'locked': True
}, serializer)
Expand Down
6 changes: 3 additions & 3 deletions rdmo/conditions/tests/test_validator_unique_uri.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from django.conf import settings
from django.core.exceptions import ValidationError

from rest_framework.exceptions import ValidationError as RestFameworkValidationError
from rest_framework.exceptions import ValidationError as RestFrameworkValidationError

from ..models import Condition
from ..serializers.v1 import ConditionSerializer
Expand Down Expand Up @@ -58,7 +58,7 @@ def test_unique_uri_validator_serializer_create_error(db):
validator = ConditionUniqueURIValidator()
serializer = ConditionSerializer()

with pytest.raises(RestFameworkValidationError):
with pytest.raises(RestFrameworkValidationError):
validator({
'uri_prefix': settings.DEFAULT_URI_PREFIX,
'uri_path': Condition.objects.filter(uri_prefix=settings.DEFAULT_URI_PREFIX).last().uri_path
Expand All @@ -83,7 +83,7 @@ def test_unique_uri_validator_serializer_update_error(db):
validator = ConditionUniqueURIValidator()
serializer = ConditionSerializer(instance=condition)

with pytest.raises(RestFameworkValidationError):
with pytest.raises(RestFrameworkValidationError):
validator({
'uri_prefix': condition.uri_prefix,
'uri_path': Condition.objects.filter(uri_prefix=settings.DEFAULT_URI_PREFIX).last().uri_path
Expand Down
4 changes: 2 additions & 2 deletions rdmo/domain/tests/test_validator_locked.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from django.core.exceptions import ValidationError

from rest_framework.exceptions import ValidationError as RestFameworkValidationError
from rest_framework.exceptions import ValidationError as RestFrameworkValidationError

from ..models import Attribute
from ..serializers.v1 import AttributeSerializer
Expand Down Expand Up @@ -149,7 +149,7 @@ def test_serializer_update_error(db):
validator = AttributeLockedValidator()
serializer = AttributeSerializer(instance=attribute)

with pytest.raises(RestFameworkValidationError):
with pytest.raises(RestFrameworkValidationError):
validator({
'locked': True
}, serializer)
4 changes: 2 additions & 2 deletions rdmo/domain/tests/test_validator_parent.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from django.conf import settings
from django.core.exceptions import ValidationError

from rest_framework.exceptions import ValidationError as RestFameworkValidationError
from rest_framework.exceptions import ValidationError as RestFrameworkValidationError

from ..models import Attribute
from ..serializers.v1 import AttributeSerializer
Expand Down Expand Up @@ -69,7 +69,7 @@ def test_serializer_update_error(db):
validator = AttributeParentValidator()
serializer = AttributeSerializer(instance=attribute)

with pytest.raises(RestFameworkValidationError):
with pytest.raises(RestFrameworkValidationError):
validator({
'uri_prefix': attribute.uri_prefix,
'key': attribute.key,
Expand Down
6 changes: 3 additions & 3 deletions rdmo/domain/tests/test_validator_unique_uri.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from django.conf import settings
from django.core.exceptions import ValidationError

from rest_framework.exceptions import ValidationError as RestFameworkValidationError
from rest_framework.exceptions import ValidationError as RestFrameworkValidationError

from ..models import Attribute
from ..serializers.v1 import AttributeSerializer
Expand Down Expand Up @@ -62,7 +62,7 @@ def test_validator_serializer_create_error(db):
validator = AttributeUniqueURIValidator()
serializer = AttributeSerializer()

with pytest.raises(RestFameworkValidationError):
with pytest.raises(RestFrameworkValidationError):
validator({
'uri_prefix': settings.DEFAULT_URI_PREFIX,
'key': 'text',
Expand All @@ -87,7 +87,7 @@ def test_validator_serializer_update_error(db):
validator = AttributeUniqueURIValidator()
serializer = AttributeSerializer(instance=attribute)

with pytest.raises(RestFameworkValidationError):
with pytest.raises(RestFrameworkValidationError):
validator({
'uri_prefix': attribute.uri_prefix,
'key': 'textarea',
Expand Down
4 changes: 2 additions & 2 deletions rdmo/options/tests/test_validator_locked_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from django.core.exceptions import ValidationError

from rest_framework.exceptions import ValidationError as RestFameworkValidationError
from rest_framework.exceptions import ValidationError as RestFrameworkValidationError

from ..models import Option, OptionSet
from ..serializers.v1 import OptionSerializer
Expand Down Expand Up @@ -141,7 +141,7 @@ def test_serializer_update_error(db):
validator = OptionLockedValidator()
serializer = OptionSerializer(instance=option)

with pytest.raises(RestFameworkValidationError):
with pytest.raises(RestFrameworkValidationError):
validator({
'locked': True
}, serializer)
4 changes: 2 additions & 2 deletions rdmo/options/tests/test_validator_locked_optionsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from django.core.exceptions import ValidationError

from rest_framework.exceptions import ValidationError as RestFameworkValidationError
from rest_framework.exceptions import ValidationError as RestFrameworkValidationError

from ..models import OptionSet
from ..serializers.v1 import OptionSetSerializer
Expand Down Expand Up @@ -95,7 +95,7 @@ def test_serializer_update_error(db):
validator = OptionSetLockedValidator()
serializer = OptionSetSerializer(instance=optionset)

with pytest.raises(RestFameworkValidationError):
with pytest.raises(RestFrameworkValidationError):
validator({
'locked': True
}, serializer)
6 changes: 3 additions & 3 deletions rdmo/options/tests/test_validator_unique_uri_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from django.conf import settings
from django.core.exceptions import ValidationError

from rest_framework.exceptions import ValidationError as RestFameworkValidationError
from rest_framework.exceptions import ValidationError as RestFrameworkValidationError

from ..models import Option, OptionSet
from ..serializers.v1 import OptionSerializer
Expand Down Expand Up @@ -76,7 +76,7 @@ def test_unique_uri_validator_serializer_create_error(db):
validator = OptionUniqueURIValidator()
serializer = OptionSerializer()

with pytest.raises(RestFameworkValidationError):
with pytest.raises(RestFrameworkValidationError):
validator({
'uri_prefix': settings.DEFAULT_URI_PREFIX,
'uri_path': Option.objects.first().uri_path
Expand All @@ -101,7 +101,7 @@ def test_unique_uri_validator_serializer_update_error(db):
validator = OptionUniqueURIValidator()
serializer = OptionSerializer(instance=instance)

with pytest.raises(RestFameworkValidationError):
with pytest.raises(RestFrameworkValidationError):
validator({
'uri_prefix': instance.uri_prefix,
'uri_path': Option.objects.exclude(id=instance.id).first().uri_path
Expand Down
6 changes: 3 additions & 3 deletions rdmo/options/tests/test_validator_unique_uri_optionsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from django.conf import settings
from django.core.exceptions import ValidationError

from rest_framework.exceptions import ValidationError as RestFameworkValidationError
from rest_framework.exceptions import ValidationError as RestFrameworkValidationError

from ..models import Option, OptionSet
from ..serializers.v1 import OptionSetSerializer
Expand Down Expand Up @@ -76,7 +76,7 @@ def test_unique_uri_validator_serializer_create_error(db):
validator = OptionSetUniqueURIValidator()
serializer = OptionSetSerializer()

with pytest.raises(RestFameworkValidationError):
with pytest.raises(RestFrameworkValidationError):
validator({
'uri_prefix': settings.DEFAULT_URI_PREFIX,
'uri_path': OptionSet.objects.first().uri_path
Expand All @@ -101,7 +101,7 @@ def test_unique_uri_validator_serializer_update_error(db):
validator = OptionSetUniqueURIValidator()
serializer = OptionSetSerializer(instance=instance)

with pytest.raises(RestFameworkValidationError):
with pytest.raises(RestFrameworkValidationError):
validator({
'uri_prefix': instance.uri_prefix,
'uri_path': OptionSet.objects.exclude(id=instance.id).first().uri_path
Expand Down
10 changes: 5 additions & 5 deletions rdmo/projects/tests/test_validator_conflict.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

from rest_framework.exceptions import ValidationError as RestFameworkValidationError
from rest_framework.exceptions import ValidationError as RestFrameworkValidationError

from ..models import Project, Value
from ..serializers.v1 import ValueSerializer
Expand Down Expand Up @@ -48,7 +48,7 @@ class MockedView:
serializer = ValueSerializer()
serializer.context['view'] = MockedView()

with pytest.raises(RestFameworkValidationError):
with pytest.raises(RestFrameworkValidationError):
validator({
'attribute': value.attribute,
'set_prefix': value.set_prefix,
Expand Down Expand Up @@ -99,7 +99,7 @@ class MockedView:
serializer.instance = value
serializer.context['view'] = MockedView()

with pytest.raises(RestFameworkValidationError):
with pytest.raises(RestFrameworkValidationError):
validator({
'attribute': value.attribute,
'set_prefix': value.set_prefix,
Expand Down Expand Up @@ -188,7 +188,7 @@ class MockedView:
serializer = ValueSerializer()
serializer.context['view'] = MockedView()

with pytest.raises(RestFameworkValidationError):
with pytest.raises(RestFrameworkValidationError):
validator({
'attribute': value.attribute,
'set_prefix': value.set_prefix,
Expand Down Expand Up @@ -219,7 +219,7 @@ class MockedView:
serializer = ValueSerializer()
serializer.context['view'] = MockedView()

with pytest.raises(RestFameworkValidationError):
with pytest.raises(RestFrameworkValidationError):
validator({
'attribute': value.attribute,
'set_prefix': value.set_prefix,
Expand Down
4 changes: 2 additions & 2 deletions rdmo/projects/tests/test_validator_quota.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest

from rest_framework.exceptions import ValidationError as RestFameworkValidationError
from rest_framework.exceptions import ValidationError as RestFrameworkValidationError

from ..serializers.v1 import ValueSerializer
from ..validators import ValueQuotaValidator
Expand Down Expand Up @@ -42,7 +42,7 @@ class MockedView:
serializer = ValueSerializer()
serializer.context['view'] = MockedView()

with pytest.raises(RestFameworkValidationError):
with pytest.raises(RestFrameworkValidationError):
validator({
'value_type': 'file'
}, serializer)
Expand Down
4 changes: 2 additions & 2 deletions rdmo/projects/tests/test_validator_value_type.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import pytest

from rest_framework.exceptions import ValidationError as RestFameworkValidationError
from rest_framework.exceptions import ValidationError as RestFrameworkValidationError

from ..validators import ValueTypeValidator

Expand Down Expand Up @@ -109,5 +109,5 @@ def test_serializer(db, value_type, text):
@pytest.mark.parametrize('value_type,text', data_error)
def test_serializer_error(db, value_type, text):
validator = ValueTypeValidator()
with pytest.raises(RestFameworkValidationError):
with pytest.raises(RestFrameworkValidationError):
validator({'value_type': value_type, 'text': text})
4 changes: 2 additions & 2 deletions rdmo/questions/tests/test_validator_locked_catalogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from django.core.exceptions import ValidationError

from rest_framework.exceptions import ValidationError as RestFameworkValidationError
from rest_framework.exceptions import ValidationError as RestFrameworkValidationError

from ..models import Catalog
from ..serializers.v1 import CatalogSerializer
Expand Down Expand Up @@ -93,7 +93,7 @@ def test_serializer_update_error(db):
validator = CatalogLockedValidator()
serializer = CatalogSerializer(instance=catalog)

with pytest.raises(RestFameworkValidationError):
with pytest.raises(RestFrameworkValidationError):
validator({
'locked': True
}, serializer)
4 changes: 2 additions & 2 deletions rdmo/questions/tests/test_validator_locked_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from django.core.exceptions import ValidationError

from rest_framework.exceptions import ValidationError as RestFameworkValidationError
from rest_framework.exceptions import ValidationError as RestFrameworkValidationError

from ..models import Page, Section
from ..serializers.v1 import PageSerializer
Expand Down Expand Up @@ -191,7 +191,7 @@ def test_serializer_update_error(db):
validator = PageLockedValidator()
serializer = PageSerializer(instance=page)

with pytest.raises(RestFameworkValidationError):
with pytest.raises(RestFrameworkValidationError):
validator({
'locked': True
}, serializer)
4 changes: 2 additions & 2 deletions rdmo/questions/tests/test_validator_locked_questions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from django.core.exceptions import ValidationError

from rest_framework.exceptions import ValidationError as RestFameworkValidationError
from rest_framework.exceptions import ValidationError as RestFrameworkValidationError

from ..models import Page, Question, QuestionSet
from ..serializers.v1 import QuestionSerializer
Expand Down Expand Up @@ -433,7 +433,7 @@ def test_serializer_update_error(db):
validator = QuestionLockedValidator()
serializer = QuestionSerializer(instance=question)

with pytest.raises(RestFameworkValidationError):
with pytest.raises(RestFrameworkValidationError):
validator({
'locked': True
}, serializer)
4 changes: 2 additions & 2 deletions rdmo/questions/tests/test_validator_locked_questionsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from django.core.exceptions import ValidationError

from rest_framework.exceptions import ValidationError as RestFameworkValidationError
from rest_framework.exceptions import ValidationError as RestFrameworkValidationError

from ..models import Page, QuestionSet
from ..serializers.v1 import QuestionSetSerializer
Expand Down Expand Up @@ -391,7 +391,7 @@ def test_serializer_update_error(db):
validator = QuestionSetLockedValidator()
serializer = QuestionSetSerializer(instance=instance)

with pytest.raises(RestFameworkValidationError):
with pytest.raises(RestFrameworkValidationError):
validator({
'locked': True
}, serializer)
4 changes: 2 additions & 2 deletions rdmo/questions/tests/test_validator_locked_sections.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from django.core.exceptions import ValidationError

from rest_framework.exceptions import ValidationError as RestFameworkValidationError
from rest_framework.exceptions import ValidationError as RestFrameworkValidationError

from ..models import Catalog, Section
from ..serializers.v1 import SectionSerializer
Expand Down Expand Up @@ -151,7 +151,7 @@ def test_serializer_update_error(db):
validator = SectionLockedValidator()
serializer = SectionSerializer(instance=section)

with pytest.raises(RestFameworkValidationError):
with pytest.raises(RestFrameworkValidationError):
validator({
'locked': True
}, serializer)
Loading

0 comments on commit e79a49d

Please sign in to comment.