Skip to content

Commit

Permalink
Fix some typos (#714)
Browse files Browse the repository at this point in the history
* Fix some typos

* s/modal/model/
  • Loading branch information
danielhoherd authored and SteadBytes committed Oct 10, 2019
1 parent a7e363a commit 9b9ad42
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion doc/marshalling.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ You can use fields to multiplex a single attribute to multiple output values.
This example assumes that bit 1 in the ``flags`` attribute signifies a
"Normal" or "Urgent" item, and bit 2 signifies "Read" or "Unread".
These items might be easy to store in a bitfield,
but for a human readable output it's nice to convert them to seperate string fields.
but for a human readable output it's nice to convert them to separate string fields.

.. code-block:: python
Expand Down
4 changes: 2 additions & 2 deletions doc/parsing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ The :mod:`~flask_restplus.inputs` module provides some common type handling like

- :func:`~inputs.boolean` for wider boolean handling
- :func:`~inputs.ipv4` and :func:`~inputs.ipv6` for IP adresses
- :func:`~inputs.date_from_iso8601` and :func:`~inputs.datetime_from_iso8601` for ISO8601 date and dateime handling
- :func:`~inputs.date_from_iso8601` and :func:`~inputs.datetime_from_iso8601` for ISO8601 date and datetime handling

You just have to use them as `type` argument:

Expand All @@ -193,7 +193,7 @@ You can also write your own:
raise ValueError('This is not my type')
return parse(value)
# Swagger documntation
# Swagger documentation
my_type.__schema__ = {'type': 'string', 'format': 'my-custom-format'}
Expand Down
4 changes: 2 additions & 2 deletions doc/swagger.rst
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ Models can also be specified with a :class:`~flask_restplus.reqparse.RequestPars
.. note::

Using :class:`~flask_restplus.reqparse.RequestParser` is prefered over the ``api.param()`` decorator
Using :class:`~flask_restplus.reqparse.RequestParser` is preferred over the ``api.param()`` decorator
to document form fields as it also perform validation.

Headers
Expand Down Expand Up @@ -862,7 +862,7 @@ It supports both extensions as `dict` or `kwargs` and perform automatique `x-` p
class Vendor(Resource):
@api.vendor({
'extension-1': {'works': 'with complex values'},
'x-extension-3': 'x- prefix is optionnal',
'x-extension-3': 'x- prefix is optional',
})
def get(self):
return {}
Expand Down
6 changes: 3 additions & 3 deletions flask_restplus/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def make_response(self, data, *args, **kwargs):
raise InternalServerError()

def documentation(self, func):
'''A decorator to specify a view funtion for the documentation'''
'''A decorator to specify a view function for the documentation'''
self._doc_view = func
return func

Expand All @@ -379,7 +379,7 @@ def default_endpoint(self, resource, namespace):
Endpoints are ensured not to collide.
Override this method specify a custom algoryhtm for default endpoint.
Override this method specify a custom algorithm for default endpoint.
:param Resource resource: the resource for which we want an endpoint
:param Namespace namespace: the namespace holding the resource
Expand Down Expand Up @@ -565,7 +565,7 @@ def _has_fr_route(self):

def error_router(self, original_handler, e):
'''
This function decides whether the error occured in a flask-restplus
This function decides whether the error occurred in a flask-restplus
endpoint or not. If it happened in a flask-restplus endpoint, our
handler will be dispatched. If it happened in an unrelated view, the
app's original error handler will be dispatched.
Expand Down
4 changes: 2 additions & 2 deletions flask_restplus/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ def __str__(self):


class ValidationError(RestError):
'''An helper class for validation errors.'''
'''A helper class for validation errors.'''
pass


class SpecsError(RestError):
'''An helper class for incoherent specifications.'''
'''A helper class for incoherent specifications.'''
pass
4 changes: 2 additions & 2 deletions flask_restplus/mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def parse(self, mask):
raise ParseError('Missing closing bracket')

def clean(self, mask):
'''Remove unecessary characters'''
'''Remove unnecessary characters'''
mask = mask.replace('\n', '').strip()
# External brackets are optional
if mask[0] == '{':
Expand Down Expand Up @@ -132,7 +132,7 @@ def filter_data(self, data):
Handle the data filtering given a parsed mask
:param dict data: the raw data to filter
:param list mask: a parsed mask tofilter against
:param list mask: a parsed mask to filter against
:param bool skip: whether or not to skip missing fields
'''
Expand Down
2 changes: 1 addition & 1 deletion flask_restplus/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def extend(self, name, fields):
:param str name: The new model name
:param dict fields: The new model extra fields
:depreated: since 0.9. Use :meth:`clone` instead.
:deprecated: since 0.9. Use :meth:`clone` instead.
'''
warnings.warn('extend is is deprecated, use clone instead', DeprecationWarning, stacklevel=2)
if isinstance(fields, (list, tuple)):
Expand Down
2 changes: 1 addition & 1 deletion flask_restplus/namespace.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def clone(self, name, *specs):

def inherit(self, name, *specs):
'''
Inherit a modal (use the Swagger composition pattern aka. allOf)
Inherit a model (use the Swagger composition pattern aka. allOf)
.. seealso:: :meth:`Model.inherit`
'''
Expand Down

0 comments on commit 9b9ad42

Please sign in to comment.