From: François Freitag Date: Sat, 2 Dec 2017 21:26:45 +0000 (-0800) Subject: Apply isort on repository X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=baa1726d0da0186964ae38fe7d1653c0b6da26ac;p=redacted-XKCD-password-generator.git Apply isort on repository Imports are easier to follow if there they are sorted alphabetically, and grouped by: - __future__, - stdlib, - third party, - current project, - local imports. --- diff --git a/examples/example_import.py b/examples/example_import.py index cb8282d..55e2320 100644 --- a/examples/example_import.py +++ b/examples/example_import.py @@ -1,6 +1,7 @@ -import xkcdpass.xkcd_password as xp import random +import xkcdpass.xkcd_password as xp + def random_capitalisation(s, chance): new_str = [] diff --git a/examples/example_json.py b/examples/example_json.py index 4f22fe5..d3ad9f6 100644 --- a/examples/example_json.py +++ b/examples/example_json.py @@ -1,4 +1,5 @@ from xkcdpass import xkcd_password as xp + from django.http import JsonResponse diff --git a/examples/example_postprocess.py b/examples/example_postprocess.py index 62fe7b6..069fb6e 100755 --- a/examples/example_postprocess.py +++ b/examples/example_postprocess.py @@ -1,7 +1,7 @@ #!/usr/bin/env python -import sys import fileinput import random +import sys # generate a list of symbols via ascii code SYMBOLS = [str(unichr(i)) for i in range(33, 65)] diff --git a/setup.py b/setup.py index 4154dad..5c37dc9 100644 --- a/setup.py +++ b/setup.py @@ -1,6 +1,5 @@ from setuptools import setup - setup( name='xkcdpass', version='1.14.3', diff --git a/tests/test_xkcdpass.py b/tests/test_xkcdpass.py index 70aad5f..c21e660 100644 --- a/tests/test_xkcdpass.py +++ b/tests/test_xkcdpass.py @@ -1,11 +1,10 @@ import re -import sys import subprocess +import sys import unittest from xkcdpass import xkcd_password - WORDFILE = 'xkcdpass/static/legacy' diff --git a/xkcdpass/xkcd_password.py b/xkcdpass/xkcd_password.py index b9a03b7..f30cbd3 100755 --- a/xkcdpass/xkcd_password.py +++ b/xkcdpass/xkcd_password.py @@ -1,12 +1,12 @@ #!/usr/bin/env python # encoding: utf-8 -import random +import argparse +import math import os import os.path -import argparse +import random import re -import math import sys __LICENSE__ = """