Skip to content

Commit ab694ec

Browse files
authored
Fix typo (#9231)
1 parent 74689b1 commit ab694ec

File tree

9 files changed

+14
-14
lines changed

9 files changed

+14
-14
lines changed

docs/api-guide/fields.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ Corresponds to `django.db.models.fields.DecimalField`.
303303
* `min_value` Validate that the number provided is no less than this value.
304304
* `localize` Set to `True` to enable localization of input and output based on the current locale. This will also force `coerce_to_string` to `True`. Defaults to `False`. Note that data formatting is enabled if you have set `USE_L10N=True` in your settings file.
305305
* `rounding` Sets the rounding mode used when quantizing to the configured precision. Valid values are [`decimal` module rounding modes][python-decimal-rounding-modes]. Defaults to `None`.
306-
* `normalize_output` Will normalize the decimal value when serialized. This will strip all trailing zeroes and change the value's precision to the minimum required precision to be able to represent the value without loosing data. Defaults to `False`.
306+
* `normalize_output` Will normalize the decimal value when serialized. This will strip all trailing zeroes and change the value's precision to the minimum required precision to be able to represent the value without losing data. Defaults to `False`.
307307

308308
#### Example usage
309309

docs/community/release-notes.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Date: 22nd September 2022
4747
* Stop calling `set_context` on Validators. [[#8589](https://github.com/encode/django-rest-framework/pull/8589)]
4848
* Return `NotImplemented` from `ErrorDetails.__ne__`. [[#8538](https://github.com/encode/django-rest-framework/pull/8538)]
4949
* Don't evaluate `DateTimeField.default_timezone` when a custom timezone is set. [[#8531](https://github.com/encode/django-rest-framework/pull/8531)]
50-
* Make relative URLs clickable in Browseable API. [[#8464](https://github.com/encode/django-rest-framework/pull/8464)]
50+
* Make relative URLs clickable in Browsable API. [[#8464](https://github.com/encode/django-rest-framework/pull/8464)]
5151
* Support `ManyRelatedField` falling back to the default value when the attribute specified by dot notation doesn't exist. Matches `ManyRelatedField.get_attribute` to `Field.get_attribute`. [[#7574](https://github.com/encode/django-rest-framework/pull/7574)]
5252
* Make `schemas.openapi.get_reference` public. [[#7515](https://github.com/encode/django-rest-framework/pull/7515)]
5353
* Make `ReturnDict` support `dict` union operators on Python 3.9 and later. [[#8302](https://github.com/encode/django-rest-framework/pull/8302)]
@@ -65,7 +65,7 @@ Date: 15th December 2021
6565

6666
Date: 13th December 2021
6767

68-
* Django 4.0 compatability. [#8178]
68+
* Django 4.0 compatibility. [#8178]
6969
* Add `max_length` and `min_length` options to `ListSerializer`. [#8165]
7070
* Add `get_request_serializer` and `get_response_serializer` hooks to `AutoSchema`. [#7424]
7171
* Fix OpenAPI representation of null-able read only fields. [#8116]
@@ -954,7 +954,7 @@ See the [release announcement][3.6-release].
954954
* Prevent raising exception when limit is 0. ([#4098][gh4098])
955955
* TokenAuthentication: Allow custom keyword in the header. ([#4097][gh4097])
956956
* Handle incorrectly padded HTTP basic auth header. ([#4090][gh4090])
957-
* LimitOffset pagination crashes Browseable API when limit=0. ([#4079][gh4079])
957+
* LimitOffset pagination crashes Browsable API when limit=0. ([#4079][gh4079])
958958
* Fixed DecimalField arbitrary precision support. ([#4075][gh4075])
959959
* Added support for custom CSRF cookie names. ([#4049][gh4049])
960960
* Fix regression introduced by #4035. ([#4041][gh4041])

rest_framework/filters.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@
2121

2222

2323
def search_smart_split(search_terms):
24-
"""generator that first splits string by spaces, leaving quoted phrases togheter,
24+
"""generator that first splits string by spaces, leaving quoted phrases together,
2525
then it splits non-quoted phrases by commas.
2626
"""
2727
for term in smart_split(search_terms):
2828
# trim commas to avoid bad matching for quoted phrases
2929
term = term.strip(',')
3030
if term.startswith(('"', "'")) and term[0] == term[-1]:
31-
# quoted phrases are kept togheter without any other split
31+
# quoted phrases are kept together without any other split
3232
yield unescape_string_literal(term)
3333
else:
3434
# non-quoted tokens are split by comma, keeping only non-empty ones

rest_framework/schemas/generators.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,12 @@ def get_path_from_regex(self, path_regex):
102102
Given a URL conf regex, return a URI template string.
103103
"""
104104
# ???: Would it be feasible to adjust this such that we generate the
105-
# path, plus the kwargs, plus the type from the convertor, such that we
105+
# path, plus the kwargs, plus the type from the converter, such that we
106106
# could feed that straight into the parameter schema object?
107107

108108
path = simplify_regex(path_regex)
109109

110-
# Strip Django 2.0 convertors as they are incompatible with uritemplate format
110+
# Strip Django 2.0 converters as they are incompatible with uritemplate format
111111
return re.sub(_PATH_PARAMETER_COMPONENT_RE, r'{\g<parameter>}', path)
112112

113113
def should_include_endpoint(self, path, callback):

rest_framework/schemas/openapi.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def get_schema(self, request=None, public=False):
8484
continue
8585
if components_schemas[k] == components[k]:
8686
continue
87-
warnings.warn('Schema component "{}" has been overriden with a different value.'.format(k))
87+
warnings.warn('Schema component "{}" has been overridden with a different value.'.format(k))
8888

8989
components_schemas.update(components)
9090

rest_framework/settings.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
'COERCE_DECIMAL_TO_STRING': True,
117117
'UPLOADED_FILES_USE_URL': True,
118118

119-
# Browseable API
119+
# Browsable API
120120
'HTML_SELECT_CUTOFF': 1000,
121121
'HTML_SELECT_CUTOFF_TEXT': "More than {count} items...",
122122

tests/schemas/test_openapi.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1347,7 +1347,7 @@ def test_duplicate_component_name(self):
13471347

13481348
assert len(w) == 1
13491349
assert issubclass(w[-1].category, UserWarning)
1350-
assert 'has been overriden with a different value.' in str(w[-1].message)
1350+
assert 'has been overridden with a different value.' in str(w[-1].message)
13511351

13521352
assert 'components' in schema
13531353
assert 'schemas' in schema['components']

tests/test_response.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ class HTMLNewModelView(generics.ListCreateAPIView):
132132
]
133133

134134

135-
# TODO: Clean tests bellow - remove duplicates with above, better unit testing, ...
135+
# TODO: Clean tests below - remove duplicates with above, better unit testing, ...
136136
@override_settings(ROOT_URLCONF='tests.test_response')
137137
class RendererIntegrationTests(TestCase):
138138
"""

tests/test_serializer_nested.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def test_json_validate(self):
223223
input_data = {}
224224
serializer = self.Serializer(data=input_data)
225225

226-
# request is empty, therefor 'nested' should not be in serializer.data
226+
# request is empty, therefore 'nested' should not be in serializer.data
227227
assert serializer.is_valid()
228228
assert 'nested' not in serializer.validated_data
229229

@@ -237,7 +237,7 @@ def test_multipart_validate(self):
237237
input_data = QueryDict('')
238238
serializer = self.Serializer(data=input_data)
239239

240-
# the querydict is empty, therefor 'nested' should not be in serializer.data
240+
# the querydict is empty, therefore 'nested' should not be in serializer.data
241241
assert serializer.is_valid()
242242
assert 'nested' not in serializer.validated_data
243243

0 commit comments

Comments
 (0)