Browse Source

📝 Update docstring for gt, ge, lt and le parameters

pull/13250/head
junah201 2 months ago
parent
commit
8d877715e8
No known key found for this signature in database GPG Key ID: CF7A94DA24CDA12F
  1. 77
      fastapi/param_functions.py

77
fastapi/param_functions.py

@ -94,8 +94,8 @@ def Path( # noqa: N802
Optional[SupportsGt],
Doc(
"""
Greater than. If set, value must be greater than this. Only applicable to
numbers.
Greater than. If set, value must be greater than this. Applicable to
any comparable type, not just numbers.
"""
),
] = None,
@ -104,7 +104,7 @@ def Path( # noqa: N802
Doc(
"""
Greater than or equal. If set, value must be greater than or equal to
this. Only applicable to numbers.
this. Applicable to any comparable type, not just numbers.
"""
),
] = None,
@ -112,7 +112,8 @@ def Path( # noqa: N802
Optional[SupportsLt],
Doc(
"""
Less than. If set, value must be less than this. Only applicable to numbers.
Less than. If set, value must be less than this. Applicable to
any comparable type, not just numbers.
"""
),
] = None,
@ -121,7 +122,7 @@ def Path( # noqa: N802
Doc(
"""
Less than or equal. If set, value must be less than or equal to this.
Only applicable to numbers.
Applicable to any comparable type, not just numbers.
"""
),
] = None,
@ -419,8 +420,8 @@ def Query( # noqa: N802
Optional[SupportsGt],
Doc(
"""
Greater than. If set, value must be greater than this. Only applicable to
numbers.
Greater than. If set, value must be greater than this. Applicable to
any comparable type, not just numbers.
"""
),
] = None,
@ -429,7 +430,7 @@ def Query( # noqa: N802
Doc(
"""
Greater than or equal. If set, value must be greater than or equal to
this. Only applicable to numbers.
this. Applicable to any comparable type, not just numbers.
"""
),
] = None,
@ -437,7 +438,8 @@ def Query( # noqa: N802
Optional[SupportsLt],
Doc(
"""
Less than. If set, value must be less than this. Only applicable to numbers.
Less than. If set, value must be less than this. Applicable to
any comparable type, not just numbers.
"""
),
] = None,
@ -446,7 +448,7 @@ def Query( # noqa: N802
Doc(
"""
Less than or equal. If set, value must be less than or equal to this.
Only applicable to numbers.
Applicable to any comparable type, not just numbers.
"""
),
] = None,
@ -734,8 +736,8 @@ def Header( # noqa: N802
Optional[SupportsGt],
Doc(
"""
Greater than. If set, value must be greater than this. Only applicable to
numbers.
Greater than. If set, value must be greater than this. Applicable to
any comparable type, not just numbers.
"""
),
] = None,
@ -744,7 +746,7 @@ def Header( # noqa: N802
Doc(
"""
Greater than or equal. If set, value must be greater than or equal to
this. Only applicable to numbers.
this. Applicable to any comparable type, not just numbers.
"""
),
] = None,
@ -752,7 +754,8 @@ def Header( # noqa: N802
Optional[SupportsLt],
Doc(
"""
Less than. If set, value must be less than this. Only applicable to numbers.
Less than. If set, value must be less than this. Applicable to
any comparable type, not just numbers.
"""
),
] = None,
@ -761,7 +764,7 @@ def Header( # noqa: N802
Doc(
"""
Less than or equal. If set, value must be less than or equal to this.
Only applicable to numbers.
Applicable to any comparable type, not just numbers.
"""
),
] = None,
@ -1039,8 +1042,8 @@ def Cookie( # noqa: N802
Optional[SupportsGt],
Doc(
"""
Greater than. If set, value must be greater than this. Only applicable to
numbers.
Greater than. If set, value must be greater than this. Applicable to
any comparable type, not just numbers.
"""
),
] = None,
@ -1049,7 +1052,7 @@ def Cookie( # noqa: N802
Doc(
"""
Greater than or equal. If set, value must be greater than or equal to
this. Only applicable to numbers.
this. Applicable to any comparable type, not just numbers.
"""
),
] = None,
@ -1057,7 +1060,8 @@ def Cookie( # noqa: N802
Optional[SupportsLt],
Doc(
"""
Less than. If set, value must be less than this. Only applicable to numbers.
Less than. If set, value must be less than this. Applicable to
any comparable type, not just numbers.
"""
),
] = None,
@ -1066,7 +1070,7 @@ def Cookie( # noqa: N802
Doc(
"""
Less than or equal. If set, value must be less than or equal to this.
Only applicable to numbers.
Applicable to any comparable type, not just numbers.
"""
),
] = None,
@ -1366,8 +1370,8 @@ def Body( # noqa: N802
Optional[SupportsGt],
Doc(
"""
Greater than. If set, value must be greater than this. Only applicable to
numbers.
Greater than. If set, value must be greater than this. Applicable to
any comparable type, not just numbers.
"""
),
] = None,
@ -1376,7 +1380,7 @@ def Body( # noqa: N802
Doc(
"""
Greater than or equal. If set, value must be greater than or equal to
this. Only applicable to numbers.
this. Applicable to any comparable type, not just numbers.
"""
),
] = None,
@ -1384,7 +1388,8 @@ def Body( # noqa: N802
Optional[SupportsLt],
Doc(
"""
Less than. If set, value must be less than this. Only applicable to numbers.
Less than. If set, value must be less than this. Applicable to
any comparable type, not just numbers.
"""
),
] = None,
@ -1393,7 +1398,7 @@ def Body( # noqa: N802
Doc(
"""
Less than or equal. If set, value must be less than or equal to this.
Only applicable to numbers.
Applicable to any comparable type, not just numbers.
"""
),
] = None,
@ -1681,8 +1686,8 @@ def Form( # noqa: N802
Optional[SupportsGt],
Doc(
"""
Greater than. If set, value must be greater than this. Only applicable to
numbers.
Greater than. If set, value must be greater than this. Applicable to
any comparable type, not just numbers.
"""
),
] = None,
@ -1691,7 +1696,7 @@ def Form( # noqa: N802
Doc(
"""
Greater than or equal. If set, value must be greater than or equal to
this. Only applicable to numbers.
this. Applicable to any comparable type, not just numbers.
"""
),
] = None,
@ -1699,7 +1704,8 @@ def Form( # noqa: N802
Optional[SupportsLt],
Doc(
"""
Less than. If set, value must be less than this. Only applicable to numbers.
Less than. If set, value must be less than this. Applicable to
any comparable type, not just numbers.
"""
),
] = None,
@ -1708,7 +1714,7 @@ def Form( # noqa: N802
Doc(
"""
Less than or equal. If set, value must be less than or equal to this.
Only applicable to numbers.
Applicable to any comparable type, not just numbers.
"""
),
] = None,
@ -1995,8 +2001,8 @@ def File( # noqa: N802
Optional[SupportsGt],
Doc(
"""
Greater than. If set, value must be greater than this. Only applicable to
numbers.
Greater than. If set, value must be greater than this. Applicable to
any comparable type, not just numbers.
"""
),
] = None,
@ -2005,7 +2011,7 @@ def File( # noqa: N802
Doc(
"""
Greater than or equal. If set, value must be greater than or equal to
this. Only applicable to numbers.
this. Applicable to any comparable type, not just numbers.
"""
),
] = None,
@ -2013,7 +2019,8 @@ def File( # noqa: N802
Optional[SupportsLt],
Doc(
"""
Less than. If set, value must be less than this. Only applicable to numbers.
Less than. If set, value must be less than this. Applicable to
any comparable type, not just numbers.
"""
),
] = None,
@ -2022,7 +2029,7 @@ def File( # noqa: N802
Doc(
"""
Less than or equal. If set, value must be less than or equal to this.
Only applicable to numbers.
Applicable to any comparable type, not just numbers.
"""
),
] = None,

Loading…
Cancel
Save