Skip to content

Commit 4f4bc8a

Browse files
committed
Add protection warning to docstrings
1 parent e063e17 commit 4f4bc8a

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

flask_mongoengine/db_fields.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ class BinaryField(WtfFieldMixin, fields.BinaryField):
115115
Extends :class:`mongoengine.fields.BinaryField` with wtf required parameters.
116116
117117
For full list of arguments and keyword arguments, look parent field docs.
118+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
118119
"""
119120

120121
def to_wtf_field(self, model, field_kwargs):
@@ -131,6 +132,7 @@ class BooleanField(WtfFieldMixin, fields.BooleanField):
131132
Extends :class:`mongoengine.fields.BooleanField` with wtf required parameters.
132133
133134
For full list of arguments and keyword arguments, look parent field docs.
135+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
134136
"""
135137

136138
def to_wtf_field(self, model, field_kwargs):
@@ -147,6 +149,7 @@ class CachedReferenceField(WtfFieldMixin, fields.CachedReferenceField):
147149
Extends :class:`mongoengine.fields.CachedReferenceField` with wtf required parameters.
148150
149151
For full list of arguments and keyword arguments, look parent field docs.
152+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
150153
"""
151154

152155
def to_wtf_field(self, model, field_kwargs):
@@ -163,6 +166,7 @@ class ComplexDateTimeField(WtfFieldMixin, fields.ComplexDateTimeField):
163166
Extends :class:`mongoengine.fields.ComplexDateTimeField` with wtf required parameters.
164167
165168
For full list of arguments and keyword arguments, look parent field docs.
169+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
166170
"""
167171

168172
def to_wtf_field(self, model, field_kwargs):
@@ -179,6 +183,7 @@ class DateField(WtfFieldMixin, fields.DateField):
179183
Extends :class:`mongoengine.fields.DateField` with wtf required parameters.
180184
181185
For full list of arguments and keyword arguments, look parent field docs.
186+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
182187
"""
183188

184189
def to_wtf_field(self, model, field_kwargs):
@@ -195,6 +200,7 @@ class DateTimeField(WtfFieldMixin, fields.DateTimeField):
195200
Extends :class:`mongoengine.fields.DateTimeField` with wtf required parameters.
196201
197202
For full list of arguments and keyword arguments, look parent field docs.
203+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
198204
"""
199205

200206
def to_wtf_field(self, model, field_kwargs):
@@ -211,6 +217,7 @@ class DecimalField(WtfFieldMixin, fields.DecimalField):
211217
Extends :class:`mongoengine.fields.DecimalField` with wtf required parameters.
212218
213219
For full list of arguments and keyword arguments, look parent field docs.
220+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
214221
"""
215222

216223
def to_wtf_field(self, model, field_kwargs):
@@ -227,6 +234,7 @@ class DictField(WtfFieldMixin, fields.DictField):
227234
Extends :class:`mongoengine.fields.DictField` with wtf required parameters.
228235
229236
For full list of arguments and keyword arguments, look parent field docs.
237+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
230238
"""
231239

232240
def to_wtf_field(self, model, field_kwargs):
@@ -243,6 +251,7 @@ class DynamicField(WtfFieldMixin, fields.DynamicField):
243251
Extends :class:`mongoengine.fields.DynamicField` with wtf required parameters.
244252
245253
For full list of arguments and keyword arguments, look parent field docs.
254+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
246255
"""
247256

248257
def to_wtf_field(self, model, field_kwargs):
@@ -259,6 +268,7 @@ class EmailField(WtfFieldMixin, fields.EmailField):
259268
Extends :class:`mongoengine.fields.EmailField` with wtf required parameters.
260269
261270
For full list of arguments and keyword arguments, look parent field docs.
271+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
262272
"""
263273

264274
def to_wtf_field(self, model, field_kwargs):
@@ -275,6 +285,7 @@ class EmbeddedDocumentField(WtfFieldMixin, fields.EmbeddedDocumentField):
275285
Extends :class:`mongoengine.fields.EmbeddedDocumentField` with wtf required parameters.
276286
277287
For full list of arguments and keyword arguments, look parent field docs.
288+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
278289
"""
279290

280291
def to_wtf_field(self, model, field_kwargs):
@@ -291,6 +302,7 @@ class EmbeddedDocumentListField(WtfFieldMixin, fields.EmbeddedDocumentListField)
291302
Extends :class:`mongoengine.fields.EmbeddedDocumentListField` with wtf required parameters.
292303
293304
For full list of arguments and keyword arguments, look parent field docs.
305+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
294306
"""
295307

296308
def to_wtf_field(self, model, field_kwargs):
@@ -307,6 +319,7 @@ class EnumField(WtfFieldMixin, fields.EnumField):
307319
Extends :class:`mongoengine.fields.EnumField` with wtf required parameters.
308320
309321
For full list of arguments and keyword arguments, look parent field docs.
322+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
310323
"""
311324

312325
def to_wtf_field(self, model, field_kwargs):
@@ -323,6 +336,7 @@ class FileField(WtfFieldMixin, fields.FileField):
323336
Extends :class:`mongoengine.fields.FileField` with wtf required parameters.
324337
325338
For full list of arguments and keyword arguments, look parent field docs.
339+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
326340
"""
327341

328342
def to_wtf_field(self, model, field_kwargs):
@@ -339,6 +353,7 @@ class FloatField(WtfFieldMixin, fields.FloatField):
339353
Extends :class:`mongoengine.fields.FloatField` with wtf required parameters.
340354
341355
For full list of arguments and keyword arguments, look parent field docs.
356+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
342357
"""
343358

344359
def to_wtf_field(self, model, field_kwargs):
@@ -355,6 +370,7 @@ class GenericEmbeddedDocumentField(WtfFieldMixin, fields.GenericEmbeddedDocument
355370
Extends :class:`mongoengine.fields.GenericEmbeddedDocumentField` with wtf required parameters.
356371
357372
For full list of arguments and keyword arguments, look parent field docs.
373+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
358374
"""
359375

360376
def to_wtf_field(self, model, field_kwargs):
@@ -371,6 +387,7 @@ class GenericLazyReferenceField(WtfFieldMixin, fields.GenericLazyReferenceField)
371387
Extends :class:`mongoengine.fields.GenericLazyReferenceField` with wtf required parameters.
372388
373389
For full list of arguments and keyword arguments, look parent field docs.
390+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
374391
"""
375392

376393
def to_wtf_field(self, model, field_kwargs):
@@ -387,6 +404,7 @@ class GenericReferenceField(WtfFieldMixin, fields.GenericReferenceField):
387404
Extends :class:`mongoengine.fields.GenericReferenceField` with wtf required parameters.
388405
389406
For full list of arguments and keyword arguments, look parent field docs.
407+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
390408
"""
391409

392410
def to_wtf_field(self, model, field_kwargs):
@@ -403,6 +421,7 @@ class GeoJsonBaseField(WtfFieldMixin, fields.GeoJsonBaseField):
403421
Extends :class:`mongoengine.fields.GeoJsonBaseField` with wtf required parameters.
404422
405423
For full list of arguments and keyword arguments, look parent field docs.
424+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
406425
"""
407426

408427
def to_wtf_field(self, model, field_kwargs):
@@ -419,6 +438,7 @@ class GeoPointField(WtfFieldMixin, fields.GeoPointField):
419438
Extends :class:`mongoengine.fields.GeoPointField` with wtf required parameters.
420439
421440
For full list of arguments and keyword arguments, look parent field docs.
441+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
422442
"""
423443

424444
def to_wtf_field(self, model, field_kwargs):
@@ -435,6 +455,7 @@ class ImageField(WtfFieldMixin, fields.ImageField):
435455
Extends :class:`mongoengine.fields.ImageField` with wtf required parameters.
436456
437457
For full list of arguments and keyword arguments, look parent field docs.
458+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
438459
"""
439460

440461
def to_wtf_field(self, model, field_kwargs):
@@ -451,6 +472,7 @@ class IntField(WtfFieldMixin, fields.IntField):
451472
Extends :class:`mongoengine.fields.IntField` with wtf required parameters.
452473
453474
For full list of arguments and keyword arguments, look parent field docs.
475+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
454476
"""
455477

456478
def to_wtf_field(self, model, field_kwargs):
@@ -467,6 +489,7 @@ class LazyReferenceField(WtfFieldMixin, fields.LazyReferenceField):
467489
Extends :class:`mongoengine.fields.LazyReferenceField` with wtf required parameters.
468490
469491
For full list of arguments and keyword arguments, look parent field docs.
492+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
470493
"""
471494

472495
def to_wtf_field(self, model, field_kwargs):
@@ -483,6 +506,7 @@ class LineStringField(WtfFieldMixin, fields.LineStringField):
483506
Extends :class:`mongoengine.fields.LineStringField` with wtf required parameters.
484507
485508
For full list of arguments and keyword arguments, look parent field docs.
509+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
486510
"""
487511

488512
def to_wtf_field(self, model, field_kwargs):
@@ -499,6 +523,7 @@ class ListField(WtfFieldMixin, fields.ListField):
499523
Extends :class:`mongoengine.fields.ListField` with wtf required parameters.
500524
501525
For full list of arguments and keyword arguments, look parent field docs.
526+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
502527
"""
503528

504529
def to_wtf_field(self, model, field_kwargs):
@@ -515,6 +540,7 @@ class LongField(WtfFieldMixin, fields.LongField):
515540
Extends :class:`mongoengine.fields.LongField` with wtf required parameters.
516541
517542
For full list of arguments and keyword arguments, look parent field docs.
543+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
518544
"""
519545

520546
def to_wtf_field(self, model, field_kwargs):
@@ -531,6 +557,7 @@ class MapField(WtfFieldMixin, fields.MapField):
531557
Extends :class:`mongoengine.fields.MapField` with wtf required parameters.
532558
533559
For full list of arguments and keyword arguments, look parent field docs.
560+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
534561
"""
535562

536563
def to_wtf_field(self, model, field_kwargs):
@@ -547,6 +574,7 @@ class MultiLineStringField(WtfFieldMixin, fields.MultiLineStringField):
547574
Extends :class:`mongoengine.fields.MultiLineStringField` with wtf required parameters.
548575
549576
For full list of arguments and keyword arguments, look parent field docs.
577+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
550578
"""
551579

552580
def to_wtf_field(self, model, field_kwargs):
@@ -563,6 +591,7 @@ class MultiPointField(WtfFieldMixin, fields.MultiPointField):
563591
Extends :class:`mongoengine.fields.MultiPointField` with wtf required parameters.
564592
565593
For full list of arguments and keyword arguments, look parent field docs.
594+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
566595
"""
567596

568597
def to_wtf_field(self, model, field_kwargs):
@@ -579,6 +608,7 @@ class MultiPolygonField(WtfFieldMixin, fields.MultiPolygonField):
579608
Extends :class:`mongoengine.fields.MultiPolygonField` with wtf required parameters.
580609
581610
For full list of arguments and keyword arguments, look parent field docs.
611+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
582612
"""
583613

584614
def to_wtf_field(self, model, field_kwargs):
@@ -595,6 +625,7 @@ class ObjectIdField(WtfFieldMixin, fields.ObjectIdField):
595625
Extends :class:`mongoengine.fields.ObjectIdField` with wtf required parameters.
596626
597627
For full list of arguments and keyword arguments, look parent field docs.
628+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
598629
"""
599630

600631
def to_wtf_field(self, model, field_kwargs):
@@ -611,6 +642,7 @@ class PointField(WtfFieldMixin, fields.PointField):
611642
Extends :class:`mongoengine.fields.PointField` with wtf required parameters.
612643
613644
For full list of arguments and keyword arguments, look parent field docs.
645+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
614646
"""
615647

616648
def to_wtf_field(self, model, field_kwargs):
@@ -627,6 +659,7 @@ class PolygonField(WtfFieldMixin, fields.PolygonField):
627659
Extends :class:`mongoengine.fields.PolygonField` with wtf required parameters.
628660
629661
For full list of arguments and keyword arguments, look parent field docs.
662+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
630663
"""
631664

632665
def to_wtf_field(self, model, field_kwargs):
@@ -643,6 +676,7 @@ class ReferenceField(WtfFieldMixin, fields.ReferenceField):
643676
Extends :class:`mongoengine.fields.ReferenceField` with wtf required parameters.
644677
645678
For full list of arguments and keyword arguments, look parent field docs.
679+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
646680
"""
647681

648682
def to_wtf_field(self, model, field_kwargs):
@@ -659,6 +693,7 @@ class SequenceField(WtfFieldMixin, fields.SequenceField):
659693
Extends :class:`mongoengine.fields.SequenceField` with wtf required parameters.
660694
661695
For full list of arguments and keyword arguments, look parent field docs.
696+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
662697
"""
663698

664699
def to_wtf_field(self, model, field_kwargs):
@@ -675,6 +710,7 @@ class SortedListField(WtfFieldMixin, fields.SortedListField):
675710
Extends :class:`mongoengine.fields.SortedListField` with wtf required parameters.
676711
677712
For full list of arguments and keyword arguments, look parent field docs.
713+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
678714
"""
679715

680716
def to_wtf_field(self, model, field_kwargs):
@@ -691,6 +727,7 @@ class StringField(WtfFieldMixin, fields.StringField):
691727
Extends :class:`mongoengine.fields.StringField` with wtf required parameters.
692728
693729
For full list of arguments and keyword arguments, look parent field docs.
730+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
694731
"""
695732

696733
def to_wtf_field(self, model, field_kwargs):
@@ -707,6 +744,7 @@ class URLField(WtfFieldMixin, fields.URLField):
707744
Extends :class:`mongoengine.fields.URLField` with wtf required parameters.
708745
709746
For full list of arguments and keyword arguments, look parent field docs.
747+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
710748
"""
711749

712750
def to_wtf_field(self, model, field_kwargs):
@@ -723,6 +761,7 @@ class UUIDField(WtfFieldMixin, fields.UUIDField):
723761
Extends :class:`mongoengine.fields.UUIDField` with wtf required parameters.
724762
725763
For full list of arguments and keyword arguments, look parent field docs.
764+
All arguments should be passed as keyword arguments, to exclude unexpected behaviour.
726765
"""
727766

728767
def to_wtf_field(self, model, field_kwargs):

0 commit comments

Comments
 (0)