Skip to content

Commit

Permalink
isort
Browse files Browse the repository at this point in the history
  • Loading branch information
chr-peters committed Mar 23, 2021
1 parent a349e00 commit 104e712
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 18 deletions.
3 changes: 0 additions & 3 deletions .flake8

This file was deleted.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from setuptools import setup, find_packages
from setuptools import find_packages, setup

setup(
name="strong-but-simple-passwords",
Expand Down
6 changes: 4 additions & 2 deletions strong_but_simple_passwords/__init__.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
from pathlib import Path

from flask import Flask
from flask_talisman import Talisman
from whitenoise import WhiteNoise
from pathlib import Path
from .config import get_config_from_env_vars

from . import views
from .config import get_config_from_env_vars


def create_app(config=None):
Expand Down
2 changes: 1 addition & 1 deletion strong_but_simple_passwords/core.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import random
from zxcvbn import zxcvbn

from zxcvbn import zxcvbn

sentences = [
"My favourite food is lemon ice cream",
Expand Down
5 changes: 3 additions & 2 deletions strong_but_simple_passwords/views.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from flask import render_template, request

from .core import (
get_random_sentence,
generate_password_from_sentence,
estimate_password_strength,
generate_password_from_sentence,
get_random_sentence,
)


Expand Down
1 change: 1 addition & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from strong_but_simple_passwords import create_app


Expand Down
3 changes: 2 additions & 1 deletion tests/test_app.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from strong_but_simple_passwords import create_app
import os

from strong_but_simple_passwords import create_app


def test_custom_config():
class Config:
Expand Down
18 changes: 10 additions & 8 deletions tests/test_core.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,20 @@
import random
from decimal import Decimal

import pytest

from strong_but_simple_passwords import core
from strong_but_simple_passwords.core import (
estimate_password_strength,
generate_password_from_sentence,
get_first_letters_from_each_word,
get_first_letters_from_word,
get_random_sentence,
get_random_symbol,
put_symbol_between_words,
sentences,
symbols,
get_first_letters_from_word,
get_first_letters_from_each_word,
put_symbol_between_words,
generate_password_from_sentence,
estimate_password_strength,
)
from strong_but_simple_passwords import core
import random
from decimal import Decimal


def test_get_random_sentence():
Expand Down
12 changes: 12 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
[isort]
multi_line_output = 3
include_trailing_comma = True
force_grid_wrap = 0
use_parentheses = True
ensure_newline_before_comments = True
line_length = 88

[flake8]
max-line-length = 88
extend-ignore = E203, W503

[tox]
envlist = py39

Expand Down

0 comments on commit 104e712

Please sign in to comment.