From 055f7c1eb6172736e830120532934077ee87c102 Mon Sep 17 00:00:00 2001 From: travis Date: Wed, 19 Oct 2011 10:00:13 -0500 Subject: [PATCH] Some Doc and doctoring fixes by the Speling Poleece. --- docs/community/faq.rst | 3 +-- docs/community/support.rst | 2 +- docs/community/updates.rst | 2 +- requests/api.py | 2 +- requests/exceptions.py | 2 +- requests/hooks.py | 2 +- requests/models.py | 12 ++++++------ requests/sessions.py | 2 +- requests/status_codes.py | 4 ++-- requests/structures.py | 2 +- requests/utils.py | 4 ++-- 11 files changed, 18 insertions(+), 19 deletions(-) diff --git a/docs/community/faq.rst b/docs/community/faq.rst index 0cda659..dd6f80d 100644 --- a/docs/community/faq.rst +++ b/docs/community/faq.rst @@ -9,8 +9,7 @@ Encoded Data? ------------- Requests automatically decompresses gzip-encoded responses, and does -its best to decodes response content to unicode when possible. -it's best to decodes response content to unicode when possible. +its best to decode response content to unicode when possible. You can get direct access to the raw response (and even the socket), if needed as well. diff --git a/docs/community/support.rst b/docs/community/support.rst index 53f3c81..2dc0b31 100644 --- a/docs/community/support.rst +++ b/docs/community/support.rst @@ -3,7 +3,7 @@ Support ======= -If you have a questions or issues about Requests, there are serveral options: +If you have a questions or issues about Requests, there are several options: Send a Tweet ------------ diff --git a/docs/community/updates.rst b/docs/community/updates.rst index e6e1559..fe2f9bf 100644 --- a/docs/community/updates.rst +++ b/docs/community/updates.rst @@ -4,7 +4,7 @@ Updates ======= If you'd like to stay up to date on the community and development of Requests, -there are serveral options: +there are several options: GitHub ------ diff --git a/requests/api.py b/requests/api.py index 1b847b7..fa1b9b7 100644 --- a/requests/api.py +++ b/requests/api.py @@ -4,7 +4,7 @@ requests.api ~~~~~~~~~~~~ -This module impliments the Requests API. +This module implements the Requests API. :copyright: (c) 2011 by Kenneth Reitz. :license: ISC, see LICENSE for more details. diff --git a/requests/exceptions.py b/requests/exceptions.py index c08c614..13305e5 100644 --- a/requests/exceptions.py +++ b/requests/exceptions.py @@ -7,7 +7,7 @@ requests.exceptions """ class RequestException(Exception): - """There was an ambiguous exception that occured while handling your + """There was an ambiguous exception that occurred while handling your request.""" class AuthenticationError(RequestException): diff --git a/requests/hooks.py b/requests/hooks.py index 2938029..f9cf480 100644 --- a/requests/hooks.py +++ b/requests/hooks.py @@ -26,7 +26,7 @@ import warnings def dispatch_hook(key, hooks, hook_data): - """Dipatches a hook dictionary on a given peice of data.""" + """Dispatches a hook dictionary on a given piece of data.""" hooks = hooks or dict() diff --git a/requests/models.py b/requests/models.py index 9a8f5f9..3c952c2 100644 --- a/requests/models.py +++ b/requests/models.py @@ -41,14 +41,14 @@ class Request(object): params=dict(), auth=None, cookiejar=None, timeout=None, redirect=False, allow_redirects=False, proxies=None, hooks=None): - #: Float describ the timeout of the request. + #: Float describes the timeout of the request. # (Use socket.setdefaulttimeout() as fallback) self.timeout = timeout #: Request URL. self.url = url - #: Dictonary of HTTP Headers to attach to the :class:`Request `. + #: Dictionary of HTTP Headers to attach to the :class:`Request `. self.headers = headers #: Dictionary of files to multipart upload (``{filename: content}``). @@ -361,7 +361,7 @@ class Request(object): resp = opener(req) if settings.timeout_fallback: - # restore gobal timeout + # restore global timeout socket.setdefaulttimeout(old_timeout) if self.cookiejar is not None: @@ -412,10 +412,10 @@ class Response(object): #: Final URL location of Response. self.url = None - #: True if no :attr:`error` occured. + #: True if no :attr:`error` occurred. self.ok = False - #: Resulting :class:`HTTPError` of request, if one occured. + #: Resulting :class:`HTTPError` of request, if one occurred. self.error = None #: A list of :class:`Response ` objects from @@ -497,7 +497,7 @@ class Response(object): def raise_for_status(self): - """Raises stored :class:`HTTPError` or :class:`URLError`, if one occured.""" + """Raises stored :class:`HTTPError` or :class:`URLError`, if one occurred.""" if self.error: raise self.error diff --git a/requests/sessions.py b/requests/sessions.py index 9226a54..64ef7b2 100644 --- a/requests/sessions.py +++ b/requests/sessions.py @@ -130,6 +130,6 @@ class Session(object): def session(**kwargs): - """Returns a :class:`Session` for context-managment.""" + """Returns a :class:`Session` for context-management.""" return Session(**kwargs) \ No newline at end of file diff --git a/requests/status_codes.py b/requests/status_codes.py index a809de6..aa52b9f 100644 --- a/requests/status_codes.py +++ b/requests/status_codes.py @@ -47,13 +47,13 @@ _codes = { 412: ('precondition_failed', 'precondition'), 413: ('request_entity_too_large',), 414: ('request_uri_too_large',), - 415: ('unspported_media_type', 'unspported_media', 'media_type'), + 415: ('unsupported_media_type', 'unsupported_media', 'media_type'), 416: ('requested_range_not_satisfiable', 'requested_range', 'range_not_satisfiable'), 417: ('expectation_failed',), 418: ('im_a_teapot', 'teapot', 'i_am_a_teapot'), 422: ('unprocessable_entity', 'unprocessable'), 423: ('locked',), - 424: ('failed_depdendency', 'depdendency'), + 424: ('failed_dependency', 'dependency'), 425: ('unordered_collection', 'unordered'), 426: ('upgrade_required', 'upgrade'), 444: ('no_response', 'none'), diff --git a/requests/structures.py b/requests/structures.py index d068bf9..f23f0b3 100644 --- a/requests/structures.py +++ b/requests/structures.py @@ -4,7 +4,7 @@ requests.structures ~~~~~~~~~~~~~~~~~~~ -Datastructures that power Requests. +Data structures that power Requests. """ diff --git a/requests/utils.py b/requests/utils.py index 2e16163..8933c36 100644 --- a/requests/utils.py +++ b/requests/utils.py @@ -55,7 +55,7 @@ def header_expand(headers): collector.append(', ') - # Remove trailing seperators. + # Remove trailing separators. if collector[-1] in (', ', '; '): del collector[-1] @@ -199,7 +199,7 @@ def stream_decode_response_unicode(iterator, r): def get_unicode_from_response(r): """Returns the requested content back in unicode. - :param r: Reponse object to get unicode content from. + :param r: Response object to get unicode content from. Tried: -- 2.7.4