core: bump black from 22.12.0 to 23.1.0 (#4584)
* core: bump black from 22.12.0 to 23.1.0 Bumps [black](https://github.com/psf/black) from 22.12.0 to 23.1.0. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/compare/22.12.0...23.1.0) --- updated-dependencies: - dependency-name: black dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> * re-format Signed-off-by: Jens Langhammer <jens@goauthentik.io> * fix Signed-off-by: Jens Langhammer <jens@goauthentik.io> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Jens Langhammer <jens@goauthentik.io> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
		@ -58,7 +58,6 @@ class BlueprintInstanceSerializer(ModelSerializer):
 | 
			
		||||
        return super().validate(attrs)
 | 
			
		||||
 | 
			
		||||
    class Meta:
 | 
			
		||||
 | 
			
		||||
        model = BlueprintInstance
 | 
			
		||||
        fields = [
 | 
			
		||||
            "pk",
 | 
			
		||||
 | 
			
		||||
@ -71,7 +71,6 @@ def migration_blueprint_import(apps: Apps, schema_editor: BaseDatabaseSchemaEdit
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Migration(migrations.Migration):
 | 
			
		||||
 | 
			
		||||
    initial = True
 | 
			
		||||
 | 
			
		||||
    dependencies = [("authentik_flows", "0001_initial")]
 | 
			
		||||
@ -86,7 +85,12 @@ class Migration(migrations.Migration):
 | 
			
		||||
                    "managed",
 | 
			
		||||
                    models.TextField(
 | 
			
		||||
                        default=None,
 | 
			
		||||
                        help_text="Objects which are managed by authentik. These objects are created and updated automatically. This is flag only indicates that an object can be overwritten by migrations. You can still modify the objects via the API, but expect changes to be overwritten in a later update.",
 | 
			
		||||
                        help_text=(
 | 
			
		||||
                            "Objects which are managed by authentik. These objects are created and"
 | 
			
		||||
                            " updated automatically. This is flag only indicates that an object can"
 | 
			
		||||
                            " be overwritten by migrations. You can still modify the objects via"
 | 
			
		||||
                            " the API, but expect changes to be overwritten in a later update."
 | 
			
		||||
                        ),
 | 
			
		||||
                        null=True,
 | 
			
		||||
                        unique=True,
 | 
			
		||||
                        verbose_name="Managed by authentik",
 | 
			
		||||
 | 
			
		||||
@ -4,7 +4,6 @@ from django.db import migrations, models
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Migration(migrations.Migration):
 | 
			
		||||
 | 
			
		||||
    dependencies = [
 | 
			
		||||
        ("authentik_blueprints", "0001_initial"),
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
@ -29,18 +29,15 @@ class ManagedModel(models.Model):
 | 
			
		||||
        null=True,
 | 
			
		||||
        verbose_name=_("Managed by authentik"),
 | 
			
		||||
        help_text=_(
 | 
			
		||||
            (
 | 
			
		||||
                "Objects which are managed by authentik. These objects are created and updated "
 | 
			
		||||
                "automatically. This is flag only indicates that an object can be overwritten by "
 | 
			
		||||
                "migrations. You can still modify the objects via the API, but expect changes "
 | 
			
		||||
                "to be overwritten in a later update."
 | 
			
		||||
            )
 | 
			
		||||
            "Objects which are managed by authentik. These objects are created and updated "
 | 
			
		||||
            "automatically. This is flag only indicates that an object can be overwritten by "
 | 
			
		||||
            "migrations. You can still modify the objects via the API, but expect changes "
 | 
			
		||||
            "to be overwritten in a later update."
 | 
			
		||||
        ),
 | 
			
		||||
        unique=True,
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    class Meta:
 | 
			
		||||
 | 
			
		||||
        abstract = True
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -109,7 +106,6 @@ class BlueprintInstance(SerializerModel, ManagedModel, CreatedUpdatedModel):
 | 
			
		||||
        return f"Blueprint Instance {self.name}"
 | 
			
		||||
 | 
			
		||||
    class Meta:
 | 
			
		||||
 | 
			
		||||
        verbose_name = _("Blueprint Instance")
 | 
			
		||||
        verbose_name_plural = _("Blueprint Instances")
 | 
			
		||||
        unique_together = (
 | 
			
		||||
 | 
			
		||||
@ -24,18 +24,14 @@ class TestBlueprintsV1(TransactionTestCase):
 | 
			
		||||
        importer = Importer('{"version": 3}')
 | 
			
		||||
        self.assertFalse(importer.validate()[0])
 | 
			
		||||
        importer = Importer(
 | 
			
		||||
            (
 | 
			
		||||
                '{"version": 1,"entries":[{"identifiers":{},"attrs":{},'
 | 
			
		||||
                '"model": "authentik_core.User"}]}'
 | 
			
		||||
            )
 | 
			
		||||
            '{"version": 1,"entries":[{"identifiers":{},"attrs":{},'
 | 
			
		||||
            '"model": "authentik_core.User"}]}'
 | 
			
		||||
        )
 | 
			
		||||
        self.assertFalse(importer.validate()[0])
 | 
			
		||||
        importer = Importer(
 | 
			
		||||
            (
 | 
			
		||||
                '{"version": 1, "entries": [{"attrs": {"name": "test"}, '
 | 
			
		||||
                '"identifiers": {}, '
 | 
			
		||||
                '"model": "authentik_core.Group"}]}'
 | 
			
		||||
            )
 | 
			
		||||
            '{"version": 1, "entries": [{"attrs": {"name": "test"}, '
 | 
			
		||||
            '"identifiers": {}, '
 | 
			
		||||
            '"model": "authentik_core.Group"}]}'
 | 
			
		||||
        )
 | 
			
		||||
        self.assertFalse(importer.validate()[0])
 | 
			
		||||
 | 
			
		||||
@ -59,11 +55,9 @@ class TestBlueprintsV1(TransactionTestCase):
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
        importer = Importer(
 | 
			
		||||
            (
 | 
			
		||||
                '{"version": 1, "entries": [{"attrs": {"name": "test999", "attributes": '
 | 
			
		||||
                '{"key": ["updated_value"]}}, "identifiers": {"attributes": {"other_key": '
 | 
			
		||||
                '["other_value"]}}, "model": "authentik_core.Group"}]}'
 | 
			
		||||
            )
 | 
			
		||||
            '{"version": 1, "entries": [{"attrs": {"name": "test999", "attributes": '
 | 
			
		||||
            '{"key": ["updated_value"]}}, "identifiers": {"attributes": {"other_key": '
 | 
			
		||||
            '["other_value"]}}, "model": "authentik_core.Group"}]}'
 | 
			
		||||
        )
 | 
			
		||||
        self.assertTrue(importer.validate()[0])
 | 
			
		||||
        self.assertTrue(importer.apply())
 | 
			
		||||
 | 
			
		||||
@ -56,5 +56,4 @@ class MetaApplyBlueprint(BaseMetaModel):
 | 
			
		||||
        return ApplyBlueprintMetaSerializer
 | 
			
		||||
 | 
			
		||||
    class Meta:
 | 
			
		||||
 | 
			
		||||
        abstract = True
 | 
			
		||||
 | 
			
		||||
@ -14,7 +14,6 @@ class BaseMetaModel(Model):
 | 
			
		||||
        raise NotImplementedError
 | 
			
		||||
 | 
			
		||||
    class Meta:
 | 
			
		||||
 | 
			
		||||
        abstract = True
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user