Skip to content

Commit f29ca81

Browse files
Martin FOUS (contractor)nicolaiarocci
Martin FOUS (contractor)
authored andcommitted
Fix typos in comments
1 parent 906e9ae commit f29ca81

21 files changed

+63
-63
lines changed

eve/auth.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ class BasicAuth(object):
9595
.. versionchanged:: 0.4
9696
ensure all errors returns a parseable body #366.
9797
auth.request_auth_value replaced with getter and setter methods which
98-
rely on flask's 'g' object, for enhanced thread-safity.
98+
rely on flask's 'g' object, for enhanced thread-safety.
9999
100100
.. versionchanged:: 0.1.1
101101
auth.request_auth_value is now used to store the auth_field value.

eve/flaskapp.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class Eve(Flask, Events):
9494
.. versionchanged:: 0.2
9595
Support for additional Flask url converters.
9696
Support for optional, custom json encoder class.
97-
Support for endpoint-level authenticatoin classes.
97+
Support for endpoint-level authentication classes.
9898
New method Eve.register_resource() for registering new resource after
9999
initialization of Eve object. This is needed for simpler initialization
100100
API of all ORM/ODM extensions.
@@ -345,7 +345,7 @@ def _validate_resource_settings(self, resource, settings):
345345

346346
def validate_roles(self, directive, candidate, resource):
347347
""" Validates that user role directives are syntactically and formally
348-
adeguate.
348+
adequate.
349349
350350
:param directive: either 'allowed_[read_|write_]roles' or
351351
'allow_item_[read_|write_]roles'.
@@ -552,7 +552,7 @@ def _set_resource_defaults(self, resource, settings):
552552
'resource_title',
553553
'default_sort',
554554
'embedded_fields'.
555-
Support for endpoint-level authenticatoin classes.
555+
Support for endpoint-level authentication classes.
556556
"""
557557
settings.setdefault('url', resource)
558558
settings.setdefault('resource_methods',
@@ -799,7 +799,7 @@ def _add_resource_url_rules(self, resource, settings):
799799
view_func=item_endpoint,
800800
methods=settings['item_methods'] + ['OPTIONS'])
801801
if 'PATCH' in settings['item_methods']:
802-
# support for POST with X-HTTM-Method-Override header for
802+
# support for POST with X-HTTP-Method-Override header for
803803
# clients not supporting PATCH. Also see item_endpoint() in
804804
# endpoints.py
805805
endpoint = resource + "|item_post_override"

eve/io/base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def find(self, resource, req, sub_resource_lookup):
125125
:param req: an instance of ``eve.utils.ParsedRequest``. This contains
126126
all the constraints that must be fulfilled in order to
127127
satisfy the original request (where and sort parts, paging,
128-
etc). Be warned that `where` and `sort` expresions will
128+
etc). Be warned that `where` and `sort` expressions will
129129
need proper parsing, according to the syntax that you want
130130
to support with your driver. For example ``eve.io.Mongo``
131131
supports both Python and Mongo-like query syntaxes.
@@ -299,7 +299,7 @@ def is_empty(self, resource):
299299
""" Returns True if the collection is empty; False otherwise. While
300300
a user could rely on self.find() method to achieve the same result,
301301
this method can probably take advantage of specific datastore features
302-
to provide better perfomance.
302+
to provide better performance.
303303
304304
Don't forget, a 'resource' could have a pre-defined filter. If that is
305305
the case, it will have to be taken into consideration when performing

eve/io/media.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class MediaStorage(object):
1616
along with a set of default behaviors that all other storage systems can
1717
inherit or override as necessary.
1818
19-
..versioneadded:: 0.3
19+
..versionadded:: 0.3
2020
"""
2121

2222
def __init__(self, app=None):

eve/io/mongo/geo.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ def __init__(self, json):
1616
try:
1717
self['type'] = json['type']
1818
except KeyError:
19-
raise TypeError("Not compilant to GeoJSON")
19+
raise TypeError("Not compliant to GeoJSON")
2020
self.update(json)
2121
if len(self.keys()) != 2:
22-
raise TypeError("Not compilant to GeoJSON")
22+
raise TypeError("Not compliant to GeoJSON")
2323

2424
def _correct_position(self, position):
2525
return isinstance(position, list) and \
@@ -35,7 +35,7 @@ def __init__(self, json):
3535
self['type'] != self.__class__.__name__:
3636
raise TypeError
3737
except (KeyError, TypeError):
38-
raise TypeError("Geometry not compilant to GeoJSON")
38+
raise TypeError("Geometry not compliant to GeoJSON")
3939

4040

4141
class GeometryCollection(GeoJSON):
@@ -48,7 +48,7 @@ def __init__(self, json):
4848
factory = factories[geometry["type"]]
4949
factory(geometry)
5050
except (KeyError, TypeError, AttributeError):
51-
raise TypeError("Geometry not compilant to GeoJSON")
51+
raise TypeError("Geometry not compliant to GeoJSON")
5252

5353

5454
class Point(Geometry):

eve/io/mongo/media.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def get(self, _id, resource=None):
6767
""" Returns the file given by unique id. Returns None if no file was
6868
found.
6969
70-
.. vesionchanged: 0.6
70+
.. versionchanged: 0.6
7171
Support for _id as string.
7272
"""
7373
if isinstance(_id, str_type):

eve/io/mongo/mongo.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def find(self, resource, req, sub_resource_lookup):
150150
.. versionchanged:: 0.3
151151
Support for new _mongotize() signature.
152152
153-
.. versionchagend:: 0.2
153+
.. versionchanged:: 0.2
154154
Support for sub-resources.
155155
Support for 'default_sort'.
156156
@@ -550,7 +550,7 @@ def replace(self, resource, id_, document, original):
550550
Custom ID_FIELD lookups would fail. See #203.
551551
552552
.. versionchanged:: 0.2
553-
Don't explicitly converto ID_FIELD to ObjectId anymore, so we can
553+
Don't explicitly convert ID_FIELD to ObjectId anymore, so we can
554554
also process different types (UUIDs etc).
555555
556556
.. versionadded:: 0.1.0
@@ -954,7 +954,7 @@ def create_index(app, resource, name, list_of_keys, index_options):
954954
.. versionadded:: 0.6
955955
"""
956956
# it doesn't work as a typical mongodb method run in the request
957-
# life cicle, it is just called when the app start and it uses
957+
# life cycle, it is just called when the app start and it uses
958958
# pymongo directly.
959959
collection = app.config['SOURCES'][resource]['source']
960960

eve/io/mongo/parser.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
~~~~~~~~~~~~~~~~~~~
66
77
This module implements a Python-to-Mongo syntax parser. Allows the MongoDB
8-
data-layer to seamlessy respond to a Python-like query.
8+
data-layer to seamlessly respond to a Python-like query.
99
1010
:copyright: (c) 2017 by Nicola Iarocci.
1111
:license: BSD, see LICENSE for more details.
@@ -66,7 +66,7 @@ def visit_Module(self, node):
6666
# perform the magic.
6767
self.generic_visit(node)
6868

69-
# if we didn't obtain a query, it is likely that an unsopported
69+
# if we didn't obtain a query, it is likely that an unsupported
7070
# python expression has been passed.
7171
if self.mongo_query == {}:
7272
raise ParseError("Only conditional statements with boolean "

eve/io/mongo/validation.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def validate_replace(self, document, _id, original_document=None):
8484
case we want to perform a full :func:`validate` (the new document is to
8585
be considered a new insertion and required fields needs validation).
8686
However, like with validate_update, we also want the current _id
87-
not to be checked when validationg 'unique' values.
87+
not to be checked when validating 'unique' values.
8888
8989
.. versionadded:: 0.1.0
9090
"""
@@ -133,7 +133,7 @@ def _validate_unique(self, unique, field, value):
133133
134134
.. versionchanged:: 0.6
135135
Validates field value uniqueness against the whole datasource,
136-
indipendently of the request method. See #646.
136+
independently of the request method. See #646.
137137
138138
.. versionchanged:: 0.3
139139
Support for new 'self._error' signature introduced with Cerberus
@@ -286,7 +286,7 @@ def _validate_type_dbref(self, field, value):
286286
def _validate_readonly(self, read_only, field, value):
287287
"""
288288
.. versionchanged:: 0.5
289-
Not taking defaul values in consideration anymore since they are now
289+
Not taking default values in consideration anymore since they are now
290290
being resolved after validation (#353).
291291
Consider the original value if available (#479).
292292

eve/logging.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class RequestFilter(logging.Filter):
2424
2525
Note that the app.logger can also be used by callback functions.
2626
27-
def log_a_get(resoure, request, payload):
27+
def log_a_get(resource, request, payload):
2828
app.logger.info('we just responded to a GET request!')
2929
3030
app = Eve()

eve/methods/common.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ def normalize_dotted_fields(document):
485485
""" Normalizes eventual dotted fields so validation can be performed
486486
seamlessly. For example this document:
487487
488-
{"location.city": "a nested cisty"}
488+
{"location.city": "a nested city"}
489489
490490
would be normalized to:
491491
@@ -763,18 +763,18 @@ def resolve_embedded_documents(document, resource, embedded_fields):
763763
:param resource: the resource name.
764764
:param embedded_fields: the list of fields we are allowed to embed.
765765
766-
.. versionchagend:: 0.5
766+
.. versionchanged:: 0.5
767767
Support for embedding documents located in subdocuments.
768768
Allocated two functions embedded_document and subdocuments.
769769
770-
.. versionchagend:: 0.4
770+
.. versionchanged:: 0.4
771771
Moved parsing of embedded fields to _resolve_embedded_fields.
772772
Support for document versioning.
773773
774-
.. versionchagend:: 0.2
774+
.. versionchanged:: 0.2
775775
Support for 'embedded_fields'.
776776
777-
.. versonchanged:: 0.1.1
777+
.. versionchanged:: 0.1.1
778778
'collection' key has been renamed to 'resource' (data_relation).
779779
780780
.. versionadded:: 0.1.0
@@ -899,9 +899,9 @@ def store_media_files(document, resource, original=None):
899899
.. versionadded:: 0.3
900900
"""
901901
# TODO We're storing media files in advance, before the corresponding
902-
# document is also stored. In the rare occurance that the subsequent
902+
# document is also stored. In the rare occurrence that the subsequent
903903
# document update fails we should probably attempt a cleanup on the storage
904-
# sytem. Easier said than done though.
904+
# system. Easier said than done though.
905905
for field in resource_media_fields(document, resource):
906906
if original and field in original:
907907
# since file replacement is not supported by the media storage
@@ -957,7 +957,7 @@ def resolve_sub_resource_path(document, resource):
957957

958958

959959
def resolve_user_restricted_access(document, resource):
960-
""" Adds user restricted access medadata to the document if applicable.
960+
""" Adds user restricted access metadata to the document if applicable.
961961
962962
:param document: the document being posted or replaced
963963
:param resource: the resource to which the document belongs
@@ -1068,7 +1068,7 @@ def document_link(resource, document_id, version=None):
10681068

10691069
def resource_link():
10701070
""" Returns the current resource path relative to the API entry point.
1071-
Mostly going to be used by hatoeas functions when building
1071+
Mostly going to be used by hateoas functions when building
10721072
document/resource links. The resource URL stored in the config settings
10731073
might contain regexes and custom variable names, all of which are not
10741074
needed in the response payload.

eve/methods/delete.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
eve.methods.delete
55
~~~~~~~~~~~~~~~~~~
66
7-
This module imlements the DELETE method.
7+
This module implements the DELETE method.
88
99
:copyright: (c) 2017 by Nicola Iarocci.
1010
:license: BSD, see LICENSE for more details.
@@ -133,7 +133,7 @@ def deleteitem_internal(
133133
missing_media_fields = [f for f in media_fields if f not in original]
134134
if len(missing_media_fields):
135135
# retrieve the whole document so we have all media fields available
136-
# Should be very a rare occurence. We can't get rid of the
136+
# Should be very a rare occurrence. We can't get rid of the
137137
# get_document() call since it also deals with etag matching, which
138138
# is still needed. Also, this lookup should never fail.
139139
# TODO not happy with this hack. Not at all. Is there a better way?

eve/methods/get.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def get_internal(resource, **lookup):
4848
Support for HEADER_TOTAL_COUNT returned with response header.
4949
5050
.. versionchanged:: 0.5
51-
Support for customisable query parameters.
51+
Support for customizable query parameters.
5252
5353
.. versionchanged:: 0.4
5454
Add pagination info whatever the HATEOAS status.
@@ -77,7 +77,7 @@ def get_internal(resource, **lookup):
7777
Support for embeddable documents.
7878
7979
.. versionchanged:: 0.0.9
80-
Event hooks renamed to be more robuts and consistent: 'on_getting'
80+
Event hooks renamed to be more robust and consistent: 'on_getting'
8181
renamed to 'on_fetch'.
8282
8383
.. versionchanged:: 0.0.8
@@ -159,7 +159,7 @@ def parse_aggregation_stage(d, key, value):
159159
response[config.ITEMS] = documents
160160

161161
# PyMongo's CommandCursor does not return a count, so we cannot
162-
# provide paination/total count info as we do with a normal (non-aggregate)
162+
# provide pagination/total count info as we do with a normal (non-aggregate)
163163
# GET request.
164164

165165
return response, None, None, 200, []
@@ -256,7 +256,7 @@ def getitem_internal(resource, **lookup):
256256
Pagination links reflect current query. (#464)
257257
258258
.. versionchanged:: 0.4
259-
HATOEAS link for contains the business unit value even when
259+
HATEOAS link for contains the business unit value even when
260260
regexes have been configured for the resource endpoint.
261261
'on_fetched' now returns the whole response (HATEOAS metafields
262262
included.)
@@ -268,7 +268,7 @@ def getitem_internal(resource, **lookup):
268268
When IF_MATCH is disabled, no etag is included in the payload.
269269
270270
.. versionchanged:: 0.1.1
271-
Support for Embeded Resource Serialization.
271+
Support for Embedded Resource Serialization.
272272
273273
.. versionchanged:: 0.1.0
274274
Support for optional HATEOAS.
@@ -473,7 +473,7 @@ def _pagination_links(resource, req, document_count, document_id=None):
473473
Pagination links reflect current query. (#464)
474474
475475
.. versionchanged:: 0.4
476-
HATOEAS link for contains the business unit value even when
476+
HATEOAS link for contains the business unit value even when
477477
regexes have been configured for the resource endpoint.
478478
479479
.. versionchanged:: 0.0.8

eve/methods/patch.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
eve.methods.patch
55
~~~~~~~~~~~~~~~~~
66
7-
This module imlements the PATCH method.
7+
This module implements the PATCH method.
88
99
:copyright: (c) 2017 by Nicola Iarocci.
1010
:license: BSD, see LICENSE for more details.
@@ -82,7 +82,7 @@ def patch_internal(resource, payload=None, concurrency_check=False,
8282
through. Fixes #395.
8383
8484
.. versionchanged:: 0.4
85-
Allow abort() to be inoked by callback functions.
85+
Allow abort() to be invoked by callback functions.
8686
'on_update' raised before performing the update on the database.
8787
Support for document versioning.
8888
'on_updated' raised after performing the update on the database.
@@ -120,7 +120,7 @@ def patch_internal(resource, payload=None, concurrency_check=False,
120120
ETag is now computed without the need of an additional db lookup
121121
122122
.. versionchanged:: 0.0.5
123-
Support for 'aplication/json' Content-Type.
123+
Support for 'application/json' Content-Type.
124124
125125
.. versionchanged:: 0.0.4
126126
Added the ``requires_auth`` decorator.

0 commit comments

Comments
 (0)