Skip to content

Commit

Permalink
Merge pull request #92 from alex/flake8
Browse files Browse the repository at this point in the history
Make use of flake8-import-order to ensure some additional consistency
  • Loading branch information
dreid committed Jul 15, 2014
2 parents c591a09 + f7473e1 commit 3a149a1
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 26 deletions.
29 changes: 15 additions & 14 deletions src/nacl/c/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,29 @@
from __future__ import absolute_import, division, print_function

from nacl.c.crypto_box import (
crypto_box_SECRETKEYBYTES, crypto_box_PUBLICKEYBYTES,
crypto_box_NONCEBYTES, crypto_box_ZEROBYTES, crypto_box_BOXZEROBYTES,
crypto_box_BEFORENMBYTES, crypto_box_keypair, crypto_box, crypto_box_open,
crypto_box_beforenm, crypto_box_afternm, crypto_box_open_afternm,
crypto_box, crypto_box_BEFORENMBYTES, crypto_box_BOXZEROBYTES,
crypto_box_NONCEBYTES, crypto_box_PUBLICKEYBYTES,
crypto_box_SECRETKEYBYTES, crypto_box_ZEROBYTES, crypto_box_afternm,
crypto_box_beforenm, crypto_box_keypair, crypto_box_open,
crypto_box_open_afternm,
)
from nacl.c.crypto_hash import (
crypto_hash_BYTES, crypto_hash_sha256_BYTES, crypto_hash_sha512_BYTES,
crypto_hash, crypto_hash_sha256, crypto_hash_sha512,
crypto_hash, crypto_hash_BYTES, crypto_hash_sha256,
crypto_hash_sha256_BYTES, crypto_hash_sha512, crypto_hash_sha512_BYTES,
)
from nacl.c.crypto_scalarmult import (
crypto_scalarmult_BYTES, crypto_scalarmult_SCALARBYTES,
crypto_scalarmult, crypto_scalarmult_base,
crypto_scalarmult, crypto_scalarmult_BYTES, crypto_scalarmult_SCALARBYTES,
crypto_scalarmult_base
)
from nacl.c.crypto_secretbox import (
crypto_secretbox_KEYBYTES, crypto_secretbox_NONCEBYTES,
crypto_secretbox_ZEROBYTES, crypto_secretbox_BOXZEROBYTES,
crypto_secretbox, crypto_secretbox_open,
crypto_secretbox, crypto_secretbox_BOXZEROBYTES, crypto_secretbox_KEYBYTES,
crypto_secretbox_NONCEBYTES, crypto_secretbox_ZEROBYTES,
crypto_secretbox_open
)
from nacl.c.crypto_sign import (
crypto_sign_BYTES, crypto_sign_SEEDBYTES, crypto_sign_PUBLICKEYBYTES,
crypto_sign_SECRETKEYBYTES, crypto_sign_keypair, crypto_sign_seed_keypair,
crypto_sign, crypto_sign_open,
crypto_sign, crypto_sign_BYTES, crypto_sign_PUBLICKEYBYTES,
crypto_sign_SECRETKEYBYTES, crypto_sign_SEEDBYTES, crypto_sign_keypair,
crypto_sign_open, crypto_sign_seed_keypair,
)
from nacl.c.randombytes import randombytes
from nacl.c.sodium_core import sodium_init
Expand Down
3 changes: 1 addition & 2 deletions src/nacl/public.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@

from __future__ import absolute_import, division, print_function

from nacl import encoding
import nacl.c
import nacl.c.crypto_box

from nacl import encoding
from nacl.utils import EncryptedMessage, StringFixer, random


Expand Down
5 changes: 2 additions & 3 deletions src/nacl/secret.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,9 @@

from __future__ import absolute_import, division, print_function

from nacl import encoding
import nacl.c

from . import encoding
from .utils import EncryptedMessage, StringFixer
from nacl.utils import EncryptedMessage, StringFixer


class SecretBox(encoding.Encodable, StringFixer, object):
Expand Down
5 changes: 2 additions & 3 deletions src/nacl/signing.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@

import six

from nacl import encoding
import nacl.c

from . import encoding
from .utils import StringFixer, random
from nacl.utils import StringFixer, random


class SignedMessage(six.binary_type):
Expand Down
3 changes: 2 additions & 1 deletion tests/test_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,12 @@
from __future__ import absolute_import, division, print_function

import binascii

import pytest

from nacl.encoding import HexEncoder
from nacl.public import PrivateKey, PublicKey, Box
from nacl.exceptions import CryptoError
from nacl.public import Box, PrivateKey, PublicKey


VECTORS = [
Expand Down
2 changes: 1 addition & 1 deletion tests/test_hash.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

import pytest

import nacl.hash
import nacl.encoding
import nacl.hash


@pytest.mark.parametrize(("inp", "expected"), [
Expand Down
1 change: 1 addition & 0 deletions tests/test_secret.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from __future__ import absolute_import, division, print_function

import binascii

import pytest

from nacl.encoding import HexEncoder
Expand Down
2 changes: 1 addition & 1 deletion tests/test_signing.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@

import pytest

import nacl.signing
import nacl.encoding
import nacl.exceptions
import nacl.signing


def ed25519_known_answers():
Expand Down
4 changes: 3 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ commands =
[testenv:meta]
deps =
flake8
flake8-import-order
check-manifest
commands =
flake8 .
check-manifest . --ignore .travis.yml

[flake8]
select = E,W,F
select = E,W,F,I
exclude = .tox,*.egg
application-import-names = nacl

0 comments on commit 3a149a1

Please sign in to comment.