Skip to content

Commit 1d33b0b

Browse files
committed
Fix quotes
1 parent c6078cc commit 1d33b0b

File tree

1 file changed

+78
-78
lines changed

1 file changed

+78
-78
lines changed

netbox_custom_objects/migrations/0001_initial.py

Lines changed: 78 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -16,155 +16,155 @@ class Migration(migrations.Migration):
1616
initial = True
1717

1818
dependencies = [
19-
('core', '0018_concrete_objecttype'),
20-
('extras', '0133_make_cf_minmax_decimal'),
19+
("core", "0018_concrete_objecttype"),
20+
("extras", "0133_make_cf_minmax_decimal"),
2121
]
2222

2323
operations = [
2424
migrations.CreateModel(
25-
name='CustomObjectObjectType',
25+
name="CustomObjectObjectType",
2626
fields=[
2727
],
2828
options={
29-
'proxy': True,
30-
'indexes': [],
31-
'constraints': [],
29+
"proxy": True,
30+
"indexes": [],
31+
"constraints": [],
3232
},
33-
bases=('core.objecttype',),
33+
bases=("core.objecttype",),
3434
),
3535
migrations.CreateModel(
36-
name='CustomObjectType',
36+
name="CustomObjectType",
3737
fields=[
38-
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
39-
('created', models.DateTimeField(auto_now_add=True, null=True)),
40-
('last_updated', models.DateTimeField(auto_now=True, null=True)),
41-
('custom_field_data', models.JSONField(
38+
("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
39+
("created", models.DateTimeField(auto_now_add=True, null=True)),
40+
("last_updated", models.DateTimeField(auto_now=True, null=True)),
41+
("custom_field_data", models.JSONField(
4242
blank=True,
4343
default=dict,
4444
encoder=utilities.json.CustomFieldJSONEncoder,
4545
)),
46-
('description', models.CharField(blank=True, max_length=200)),
47-
('comments', models.TextField(blank=True)),
48-
('name', models.CharField(
46+
("description", models.CharField(blank=True, max_length=200)),
47+
("comments", models.TextField(blank=True)),
48+
("name", models.CharField(
4949
max_length=100,
5050
unique=True,
5151
validators=[
5252
django.core.validators.RegexValidator(
53-
message='Only lowercase alphanumeric characters and underscores are allowed.',
54-
regex='^[a-z0-9_]+$',
53+
message="Only lowercase alphanumeric characters and underscores are allowed.",
54+
regex="^[a-z0-9_]+$",
5555
),
5656
django.core.validators.RegexValidator(
57-
flags=re.RegexFlag['IGNORECASE'],
57+
flags=re.RegexFlag["IGNORECASE"],
5858
inverse_match=True,
59-
message='Double underscores are not permitted in custom object object type names.',
60-
regex='__',
59+
message="Double underscores are not permitted in custom object object type names.",
60+
regex="__",
6161
)
6262
]
6363
)),
64-
('version', models.CharField(blank=True, max_length=10)),
65-
('verbose_name', models.CharField(blank=True, max_length=100)),
66-
('verbose_name_plural', models.CharField(blank=True, max_length=100)),
67-
('slug', models.SlugField(max_length=100, unique=True)),
68-
('object_type', models.OneToOneField(
64+
("version", models.CharField(blank=True, max_length=10)),
65+
("verbose_name", models.CharField(blank=True, max_length=100)),
66+
("verbose_name_plural", models.CharField(blank=True, max_length=100)),
67+
("slug", models.SlugField(max_length=100, unique=True)),
68+
("object_type", models.OneToOneField(
6969
blank=True,
7070
editable=False,
7171
null=True,
7272
on_delete=django.db.models.deletion.CASCADE,
73-
related_name='custom_object_types',
74-
to='core.objecttype',
73+
related_name="custom_object_types",
74+
to="core.objecttype",
7575
)),
76-
('tags', taggit.managers.TaggableManager(through='extras.TaggedItem', to='extras.Tag')),
76+
("tags", taggit.managers.TaggableManager(through="extras.TaggedItem", to="extras.Tag")),
7777
],
7878
options={
79-
'verbose_name': 'Custom Object Type',
80-
'ordering': ('name',),
79+
"verbose_name": "Custom Object Type",
80+
"ordering": ("name",),
8181
},
8282
bases=(netbox.models.deletion.DeleteMixin, models.Model),
8383
),
8484
migrations.CreateModel(
85-
name='CustomObjectTypeField',
85+
name="CustomObjectTypeField",
8686
fields=[
87-
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
88-
('created', models.DateTimeField(auto_now_add=True, null=True)),
89-
('last_updated', models.DateTimeField(auto_now=True, null=True)),
90-
('type', models.CharField(default='text', max_length=50)),
91-
('primary', models.BooleanField(default=False)),
92-
('name', models.CharField(
87+
("id", models.BigAutoField(auto_created=True, primary_key=True, serialize=False)),
88+
("created", models.DateTimeField(auto_now_add=True, null=True)),
89+
("last_updated", models.DateTimeField(auto_now=True, null=True)),
90+
("type", models.CharField(default="text", max_length=50)),
91+
("primary", models.BooleanField(default=False)),
92+
("name", models.CharField(
9393
max_length=50,
9494
validators=[
9595
django.core.validators.RegexValidator(
96-
flags=re.RegexFlag['IGNORECASE'],
97-
message='Only alphanumeric characters and underscores are allowed.',
98-
regex='^[a-z0-9_]+$',
96+
flags=re.RegexFlag["IGNORECASE"],
97+
message="Only alphanumeric characters and underscores are allowed.",
98+
regex="^[a-z0-9_]+$",
9999
),
100100
django.core.validators.RegexValidator(
101-
flags=re.RegexFlag['IGNORECASE'],
101+
flags=re.RegexFlag["IGNORECASE"],
102102
inverse_match=True,
103-
message='Double underscores are not permitted in custom object field names.',
104-
regex='__',
103+
message="Double underscores are not permitted in custom object field names.",
104+
regex="__",
105105
)
106106
]
107107
)),
108-
('label', models.CharField(blank=True, max_length=50)),
109-
('group_name', models.CharField(blank=True, max_length=50)),
110-
('description', models.CharField(blank=True, max_length=200)),
111-
('required', models.BooleanField(default=False)),
112-
('unique', models.BooleanField(default=False)),
113-
('search_weight', models.PositiveSmallIntegerField(default=500)),
114-
('filter_logic', models.CharField(default='loose', max_length=50)),
115-
('default', models.JSONField(blank=True, null=True)),
116-
('related_object_filter', models.JSONField(blank=True, null=True)),
117-
('weight', models.PositiveSmallIntegerField(default=100)),
118-
('validation_minimum', models.BigIntegerField(blank=True, null=True)),
119-
('validation_maximum', models.BigIntegerField(blank=True, null=True)),
120-
('validation_regex', models.CharField(
108+
("label", models.CharField(blank=True, max_length=50)),
109+
("group_name", models.CharField(blank=True, max_length=50)),
110+
("description", models.CharField(blank=True, max_length=200)),
111+
("required", models.BooleanField(default=False)),
112+
("unique", models.BooleanField(default=False)),
113+
("search_weight", models.PositiveSmallIntegerField(default=500)),
114+
("filter_logic", models.CharField(default="loose", max_length=50)),
115+
("default", models.JSONField(blank=True, null=True)),
116+
("related_object_filter", models.JSONField(blank=True, null=True)),
117+
("weight", models.PositiveSmallIntegerField(default=100)),
118+
("validation_minimum", models.BigIntegerField(blank=True, null=True)),
119+
("validation_maximum", models.BigIntegerField(blank=True, null=True)),
120+
("validation_regex", models.CharField(
121121
blank=True,
122122
max_length=500,
123123
validators=[utilities.validators.validate_regex],
124124
)),
125-
('ui_visible', models.CharField(default='always', max_length=50)),
126-
('ui_editable', models.CharField(default='yes', max_length=50)),
127-
('is_cloneable', models.BooleanField(default=False)),
128-
('comments', models.TextField(blank=True)),
129-
('choice_set', models.ForeignKey(
125+
("ui_visible", models.CharField(default="always", max_length=50)),
126+
("ui_editable", models.CharField(default="yes", max_length=50)),
127+
("is_cloneable", models.BooleanField(default=False)),
128+
("comments", models.TextField(blank=True)),
129+
("choice_set", models.ForeignKey(
130130
blank=True,
131131
null=True,
132132
on_delete=django.db.models.deletion.PROTECT,
133-
related_name='choices_for_object_type',
134-
to='extras.customfieldchoiceset',
133+
related_name="choices_for_object_type",
134+
to="extras.customfieldchoiceset",
135135
)),
136-
('custom_object_type', models.ForeignKey(
136+
("custom_object_type", models.ForeignKey(
137137
on_delete=django.db.models.deletion.CASCADE,
138-
related_name='fields',
139-
to='netbox_custom_objects.customobjecttype',
138+
related_name="fields",
139+
to="netbox_custom_objects.customobjecttype",
140140
)),
141-
('related_object_type', models.ForeignKey(
141+
("related_object_type", models.ForeignKey(
142142
blank=True,
143143
null=True,
144144
on_delete=django.db.models.deletion.PROTECT,
145-
to='core.objecttype',
145+
to="core.objecttype",
146146
)),
147147
],
148148
options={
149-
'verbose_name': 'custom object type field',
150-
'verbose_name_plural': 'custom object type fields',
151-
'ordering': ['group_name', 'weight', 'name'],
149+
"verbose_name": "custom object type field",
150+
"verbose_name_plural": "custom object type fields",
151+
"ordering": ["group_name", "weight", "name"],
152152
},
153153
bases=(netbox.models.deletion.DeleteMixin, models.Model),
154154
),
155155
migrations.AddConstraint(
156-
model_name='customobjecttype',
156+
model_name="customobjecttype",
157157
constraint=models.UniqueConstraint(
158-
django.db.models.functions.text.Lower('name'),
159-
name='netbox_custom_objects_customobjecttype_name',
160-
violation_error_message='A Custom Object Type with this name already exists.',
158+
django.db.models.functions.text.Lower("name"),
159+
name="netbox_custom_objects_customobjecttype_name",
160+
violation_error_message="A Custom Object Type with this name already exists.",
161161
),
162162
),
163163
migrations.AddConstraint(
164-
model_name='customobjecttypefield',
164+
model_name="customobjecttypefield",
165165
constraint=models.UniqueConstraint(
166-
fields=('name', 'custom_object_type'),
167-
name='netbox_custom_objects_customobjecttypefield_unique_name',
166+
fields=("name", "custom_object_type"),
167+
name="netbox_custom_objects_customobjecttypefield_unique_name",
168168
),
169169
),
170170
]

0 commit comments

Comments
 (0)