From 66a080d01f52d8b95ffa16121e647d769b58b52c Mon Sep 17 00:00:00 2001 From: Terry Chia <terrycwk1994@gmail.com> Date: Thu, 10 Jul 2014 15:21:53 +0800 Subject: [PATCH] Consistent __future__ imports --- setup.py | 3 +++ src/nacl/__init__.py | 4 ++-- src/nacl/_cffi_fix.py | 3 +++ src/nacl/c/__init__.py | 1 + src/nacl/c/crypto_box.py | 1 + src/nacl/c/crypto_hash.py | 1 + src/nacl/c/crypto_scalarmult.py | 1 + src/nacl/c/crypto_secretbox.py | 1 + src/nacl/c/crypto_sign.py | 1 + src/nacl/c/randombytes.py | 1 + src/nacl/encoding.py | 3 +++ src/nacl/exceptions.py | 4 ++-- src/nacl/hash.py | 4 ++-- src/nacl/public.py | 4 ++-- src/nacl/secret.py | 4 ++-- src/nacl/signing.py | 4 ++-- src/nacl/utils.py | 4 ++-- tests/test_box.py | 3 +++ tests/test_encoding.py | 3 +++ tests/test_hash.py | 3 +++ tests/test_raw.py | 2 ++ tests/test_secret.py | 3 +++ tests/test_signing.py | 3 ++- tests/test_utils.py | 3 +++ 24 files changed, 49 insertions(+), 15 deletions(-) diff --git a/setup.py b/setup.py index 0fcf0962..2068a649 100644 --- a/setup.py +++ b/setup.py @@ -12,6 +12,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + +from __future__ import absolute_import, division, print_function + import functools import glob import os diff --git a/src/nacl/__init__.py b/src/nacl/__init__.py index a6f7b59e..0b0bb415 100644 --- a/src/nacl/__init__.py +++ b/src/nacl/__init__.py @@ -11,8 +11,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import -from __future__ import division + +from __future__ import absolute_import, division, print_function __all__ = [ "__title__", "__summary__", "__uri__", "__version__", "__author__", diff --git a/src/nacl/_cffi_fix.py b/src/nacl/_cffi_fix.py index c6ecc486..62772202 100644 --- a/src/nacl/_cffi_fix.py +++ b/src/nacl/_cffi_fix.py @@ -11,6 +11,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + +from __future__ import absolute_import, division, print_function + import imp import os.path import sys diff --git a/src/nacl/c/__init__.py b/src/nacl/c/__init__.py index 0a73a5ba..7499bbd6 100644 --- a/src/nacl/c/__init__.py +++ b/src/nacl/c/__init__.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from __future__ import absolute_import, division, print_function from nacl.c.crypto_box import ( diff --git a/src/nacl/c/crypto_box.py b/src/nacl/c/crypto_box.py index c63fd0e1..d9fd4ec7 100644 --- a/src/nacl/c/crypto_box.py +++ b/src/nacl/c/crypto_box.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from __future__ import absolute_import, division, print_function from nacl._lib import lib diff --git a/src/nacl/c/crypto_hash.py b/src/nacl/c/crypto_hash.py index de6c3be5..eef9a13f 100644 --- a/src/nacl/c/crypto_hash.py +++ b/src/nacl/c/crypto_hash.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from __future__ import absolute_import, division, print_function from nacl._lib import lib diff --git a/src/nacl/c/crypto_scalarmult.py b/src/nacl/c/crypto_scalarmult.py index f8a37387..d3f26273 100644 --- a/src/nacl/c/crypto_scalarmult.py +++ b/src/nacl/c/crypto_scalarmult.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from __future__ import absolute_import, division, print_function from nacl._lib import lib diff --git a/src/nacl/c/crypto_secretbox.py b/src/nacl/c/crypto_secretbox.py index e07caa9c..d5906f20 100644 --- a/src/nacl/c/crypto_secretbox.py +++ b/src/nacl/c/crypto_secretbox.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from __future__ import absolute_import, division, print_function from nacl._lib import lib diff --git a/src/nacl/c/crypto_sign.py b/src/nacl/c/crypto_sign.py index ba6a881e..ddfa5a23 100644 --- a/src/nacl/c/crypto_sign.py +++ b/src/nacl/c/crypto_sign.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from __future__ import absolute_import, division, print_function from nacl._lib import lib diff --git a/src/nacl/c/randombytes.py b/src/nacl/c/randombytes.py index d6f01f51..a28cd881 100644 --- a/src/nacl/c/randombytes.py +++ b/src/nacl/c/randombytes.py @@ -11,6 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + from __future__ import absolute_import, division, print_function from nacl._lib import lib diff --git a/src/nacl/encoding.py b/src/nacl/encoding.py index 000fae31..8c771ac8 100644 --- a/src/nacl/encoding.py +++ b/src/nacl/encoding.py @@ -11,6 +11,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + +from __future__ import absolute_import, division, print_function + import base64 import binascii diff --git a/src/nacl/exceptions.py b/src/nacl/exceptions.py index ae8630f5..1ba26da6 100644 --- a/src/nacl/exceptions.py +++ b/src/nacl/exceptions.py @@ -11,8 +11,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import -from __future__ import division + +from __future__ import absolute_import, division, print_function class CryptoError(Exception): diff --git a/src/nacl/hash.py b/src/nacl/hash.py index 61f2f884..ff4b711e 100644 --- a/src/nacl/hash.py +++ b/src/nacl/hash.py @@ -11,8 +11,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import -from __future__ import division + +from __future__ import absolute_import, division, print_function import nacl.c import nacl.encoding diff --git a/src/nacl/public.py b/src/nacl/public.py index 32bda571..c76bc091 100644 --- a/src/nacl/public.py +++ b/src/nacl/public.py @@ -11,8 +11,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import -from __future__ import division + +from __future__ import absolute_import, division, print_function import nacl.c import nacl.c.crypto_box diff --git a/src/nacl/secret.py b/src/nacl/secret.py index b81e7ea8..473f5565 100644 --- a/src/nacl/secret.py +++ b/src/nacl/secret.py @@ -11,8 +11,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import -from __future__ import division + +from __future__ import absolute_import, division, print_function import nacl.c diff --git a/src/nacl/signing.py b/src/nacl/signing.py index e9f05dee..cdbfa79d 100644 --- a/src/nacl/signing.py +++ b/src/nacl/signing.py @@ -11,8 +11,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import -from __future__ import division + +from __future__ import absolute_import, division, print_function import six diff --git a/src/nacl/utils.py b/src/nacl/utils.py index 61b901cb..4d555aa1 100644 --- a/src/nacl/utils.py +++ b/src/nacl/utils.py @@ -11,8 +11,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import absolute_import -from __future__ import division + +from __future__ import absolute_import, division, print_function import six diff --git a/tests/test_box.py b/tests/test_box.py index f378c729..492e36fc 100644 --- a/tests/test_box.py +++ b/tests/test_box.py @@ -11,6 +11,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + +from __future__ import absolute_import, division, print_function + import binascii import pytest diff --git a/tests/test_encoding.py b/tests/test_encoding.py index be256a26..ad6ab83a 100644 --- a/tests/test_encoding.py +++ b/tests/test_encoding.py @@ -11,6 +11,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + +from __future__ import absolute_import, division, print_function + import pytest import nacl.encoding diff --git a/tests/test_hash.py b/tests/test_hash.py index d400e4cc..c8a64ce8 100644 --- a/tests/test_hash.py +++ b/tests/test_hash.py @@ -11,6 +11,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + +from __future__ import absolute_import, division, print_function + import pytest import nacl.hash diff --git a/tests/test_raw.py b/tests/test_raw.py index f1704b83..3d145184 100644 --- a/tests/test_raw.py +++ b/tests/test_raw.py @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +from __future__ import absolute_import, division, print_function + from binascii import hexlify, unhexlify from nacl import c import hashlib diff --git a/tests/test_secret.py b/tests/test_secret.py index a69c14bb..c9446188 100644 --- a/tests/test_secret.py +++ b/tests/test_secret.py @@ -11,6 +11,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + +from __future__ import absolute_import, division, print_function + import binascii import pytest diff --git a/tests/test_signing.py b/tests/test_signing.py index f67de340..adadde84 100644 --- a/tests/test_signing.py +++ b/tests/test_signing.py @@ -11,7 +11,8 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -from __future__ import division + +from __future__ import absolute_import, division, print_function import binascii import codecs diff --git a/tests/test_utils.py b/tests/test_utils.py index 5468cc1b..1a303659 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -11,6 +11,9 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. + +from __future__ import absolute_import, division, print_function + import nacl.utils -- GitLab