From 15a3869006fa68d7ad34bc315842f2ca5b537311 Mon Sep 17 00:00:00 2001 From: Nate Prewitt Date: Tue, 19 Jul 2016 14:51:14 -0600 Subject: [PATCH] making module docstrings and coding comments consistent --- requests/__init__.py | 1 - requests/api.py | 1 - requests/certs.py | 4 ++-- requests/compat.py | 6 +++++- requests/cookies.py | 3 +++ requests/exceptions.py | 1 - requests/hooks.py | 1 - requests/sessions.py | 1 - requests/structures.py | 1 - requests/utils.py | 1 - tests/__init__.py | 2 +- tests/compat.py | 3 ++- tests/conftest.py | 3 ++- tests/test_hooks.py | 3 ++- tests/test_lowlevel.py | 2 ++ tests/test_structures.py | 3 ++- tests/test_testserver.py | 2 ++ tests/test_utils.py | 3 ++- tests/testserver/server.py | 2 ++ tests/utils.py | 2 ++ 20 files changed, 29 insertions(+), 16 deletions(-) diff --git a/requests/__init__.py b/requests/__init__.py index 9a66ee1b..aea1fbf2 100644 --- a/requests/__init__.py +++ b/requests/__init__.py @@ -38,7 +38,6 @@ is at . :copyright: (c) 2016 by Kenneth Reitz. :license: Apache 2.0, see LICENSE for more details. - """ __title__ = 'requests' diff --git a/requests/api.py b/requests/api.py index c2068d0e..580b3f35 100644 --- a/requests/api.py +++ b/requests/api.py @@ -8,7 +8,6 @@ This module implements the Requests API. :copyright: (c) 2012 by Kenneth Reitz. :license: Apache2, see LICENSE for more details. - """ from . import sessions diff --git a/requests/certs.py b/requests/certs.py index 07e64750..f922b99d 100644 --- a/requests/certs.py +++ b/requests/certs.py @@ -2,8 +2,8 @@ # -*- coding: utf-8 -*- """ -certs.py -~~~~~~~~ +requests.certs +~~~~~~~~~~~~~~ This module returns the preferred default CA certificate bundle. diff --git a/requests/compat.py b/requests/compat.py index 70edff78..eb6530d6 100644 --- a/requests/compat.py +++ b/requests/compat.py @@ -1,7 +1,11 @@ # -*- coding: utf-8 -*- """ -pythoncompat +requests.compat +~~~~~~~~~~~~~~~ + +This module handles import compatibility issues between Python 2 and +Python 3. """ from .packages import chardet diff --git a/requests/cookies.py b/requests/cookies.py index eee5168f..255d92db 100644 --- a/requests/cookies.py +++ b/requests/cookies.py @@ -1,6 +1,9 @@ # -*- coding: utf-8 -*- """ +requests.cookies +~~~~~~~~~~~~~~~~ + Compatibility code to be able to use `cookielib.CookieJar` with requests. requests.utils imports from here, so be careful with imports. diff --git a/requests/exceptions.py b/requests/exceptions.py index 3f056492..91de8bbc 100644 --- a/requests/exceptions.py +++ b/requests/exceptions.py @@ -5,7 +5,6 @@ requests.exceptions ~~~~~~~~~~~~~~~~~~~ This module contains the set of Requests' exceptions. - """ from .packages.urllib3.exceptions import HTTPError as BaseHTTPError diff --git a/requests/hooks.py b/requests/hooks.py index 9da94366..70d83a4b 100644 --- a/requests/hooks.py +++ b/requests/hooks.py @@ -10,7 +10,6 @@ Available hooks: ``response``: The response generated from a Request. - """ HOOKS = ['response'] diff --git a/requests/sessions.py b/requests/sessions.py index 3f405ba9..d2bae11f 100644 --- a/requests/sessions.py +++ b/requests/sessions.py @@ -6,7 +6,6 @@ requests.session This module provides a Session object to manage and persist settings across requests (cookies, auth, proxies). - """ import os from collections import Mapping diff --git a/requests/structures.py b/requests/structures.py index 991056e4..c4c78b2b 100644 --- a/requests/structures.py +++ b/requests/structures.py @@ -5,7 +5,6 @@ requests.structures ~~~~~~~~~~~~~~~~~~~ Data structures that power Requests. - """ import collections diff --git a/requests/utils.py b/requests/utils.py index 397a655e..16b51b63 100644 --- a/requests/utils.py +++ b/requests/utils.py @@ -6,7 +6,6 @@ requests.utils This module provides utility functions that are used within Requests that are also useful for external consumption. - """ import cgi diff --git a/tests/__init__.py b/tests/__init__.py index 3e222031..1b7182a5 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,4 +1,4 @@ -# coding: utf-8 +# -*- coding: utf-8 -*- """Requests test package initialisation.""" diff --git a/tests/compat.py b/tests/compat.py index a26bd9f4..f68e8014 100644 --- a/tests/compat.py +++ b/tests/compat.py @@ -1,4 +1,5 @@ -# coding: utf-8 +# -*- coding: utf-8 -*- + from requests.compat import is_py3 diff --git a/tests/conftest.py b/tests/conftest.py index af20e54d..cd64a765 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,5 @@ -# coding: utf-8 +# -*- coding: utf-8 -*- + import pytest from requests.compat import urljoin diff --git a/tests/test_hooks.py b/tests/test_hooks.py index e2b174d8..014b4391 100644 --- a/tests/test_hooks.py +++ b/tests/test_hooks.py @@ -1,4 +1,5 @@ -# coding: utf-8 +# -*- coding: utf-8 -*- + import pytest from requests import hooks diff --git a/tests/test_lowlevel.py b/tests/test_lowlevel.py index f3dd1b11..f6eaa93a 100644 --- a/tests/test_lowlevel.py +++ b/tests/test_lowlevel.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- + import os import pytest import threading diff --git a/tests/test_structures.py b/tests/test_structures.py index 1c332bb2..623f2b1e 100644 --- a/tests/test_structures.py +++ b/tests/test_structures.py @@ -1,4 +1,5 @@ -# coding: utf-8 +# -*- coding: utf-8 -*- + import pytest from requests.structures import CaseInsensitiveDict, LookupDict diff --git a/tests/test_testserver.py b/tests/test_testserver.py index 9a35460e..b90a9db1 100644 --- a/tests/test_testserver.py +++ b/tests/test_testserver.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- + import threading import socket import time diff --git a/tests/test_utils.py b/tests/test_utils.py index ab5c2e37..6f22f659 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -1,4 +1,5 @@ -# coding: utf-8 +# -*- coding: utf-8 -*- + from io import BytesIO import pytest diff --git a/tests/testserver/server.py b/tests/testserver/server.py index 7a92c87d..93b6522a 100644 --- a/tests/testserver/server.py +++ b/tests/testserver/server.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- + import threading import socket import select diff --git a/tests/utils.py b/tests/utils.py index 6cb75bfb..9b797fd4 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -1,3 +1,5 @@ +# -*- coding: utf-8 -*- + import contextlib import os