diff --git a/poetry.lock b/poetry.lock index 671738956dc68b634cf33ab2165d1e5ea6c31300..5fb19c4e6742e5a84075a2453911c087e50388c5 100644 --- a/poetry.lock +++ b/poetry.lock @@ -6,6 +6,14 @@ optional = false python-versions = "*" version = "0.7.12" +[[package]] +category = "dev" +description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +name = "appdirs" +optional = false +python-versions = "*" +version = "1.4.3" + [[package]] category = "dev" description = "Atomic file writes." @@ -70,6 +78,26 @@ soupsieve = ">=1.2" html5lib = ["html5lib"] lxml = ["lxml"] +[[package]] +category = "dev" +description = "The uncompromising code formatter." +name = "black" +optional = false +python-versions = ">=3.6" +version = "19.10b0" + +[package.dependencies] +appdirs = "*" +attrs = ">=18.1.0" +click = ">=6.5" +pathspec = ">=0.6,<1" +regex = "*" +toml = ">=0.9.4" +typed-ast = ">=1.4.0" + +[package.extras] +d = ["aiohttp (>=3.3.2)", "aiohttp-cors"] + [[package]] category = "main" description = "Python package for providing Mozilla's CA Bundle." @@ -487,6 +515,18 @@ django-phonenumber-field = ">=1.1.0,<4.99" django_otp = ">=0.6.0,<0.99" qrcode = ">=4.0.0,<6.99" +[package.dependencies.django-otp-yubikey] +optional = true +version = "*" + +[package.dependencies.phonenumbers] +optional = true +version = ">=7.0.9,<8.99" + +[package.dependencies.twilio] +optional = true +version = ">=6.0" + [package.extras] Call = ["twilio (>=6.0)"] SMS = ["twilio (>=6.0)"] @@ -498,7 +538,6 @@ phonenumberslite = ["phonenumberslite (>=7.0.9,<8.99)"] reference = "fceecb23a60cfd23398cf58f29148be644853697" type = "git" url = "https://github.com/Natureshadow/django-two-factor-auth" - [[package]] category = "main" description = "Integrate django with yarnpkg" @@ -632,6 +671,18 @@ flake8 = "*" flake8-polyfill = "*" pycodestyle = "*" +[[package]] +category = "dev" +description = "flake8 plugin to call black as a code style validator" +name = "flake8-black" +optional = false +python-versions = "*" +version = "0.1.1" + +[package.dependencies] +black = ">=19.3b0" +flake8 = ">=3.0.0" + [[package]] category = "dev" description = "Check for python builtins being used as variables or parameters." @@ -852,6 +903,14 @@ version = "19.2" pyparsing = ">=2.0.2" six = "*" +[[package]] +category = "dev" +description = "Utility library for gitignore style pattern matching of file paths." +name = "pathspec" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "0.6.0" + [[package]] category = "dev" description = "Python Build Reasonableness" @@ -1144,6 +1203,14 @@ maintainer = ["zest.releaser"] pil = ["pillow"] test = ["pytest", "pytest-cov", "mock"] +[[package]] +category = "dev" +description = "Alternative regular expression module, to replace re." +name = "regex" +optional = false +python-versions = "*" +version = "2019.12.9" + [[package]] category = "main" description = "Python HTTP for Humans." @@ -1518,7 +1585,7 @@ testing = ["pathlib2", "contextlib2", "unittest2"] ldap = ["django-auth-ldap"] [metadata] -content-hash = "cbeeaf3f1d7128817a3d92cb65b50bda67f408de5b62e518bc57c639ecf5575d" +content-hash = "5d1076f710fd2709c08d81f0d2a746de7d9609050a23c4c993d2e5caef284a0d" python-versions = "^3.7" [metadata.files] @@ -1526,6 +1593,10 @@ alabaster = [ {file = "alabaster-0.7.12-py2.py3-none-any.whl", hash = "sha256:446438bdcca0e05bd45ea2de1668c1d9b032e1a9154c2c259092d77031ddd359"}, {file = "alabaster-0.7.12.tar.gz", hash = "sha256:a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02"}, ] +appdirs = [ + {file = "appdirs-1.4.3-py2.py3-none-any.whl", hash = "sha256:d8b24664561d0d34ddfaec54636d502d7cea6e29c3eaf68f3df6180863e2166e"}, + {file = "appdirs-1.4.3.tar.gz", hash = "sha256:9e5896d1372858f8dd3344faf4e5014d21849c756c8d5701f78f8a103b372d92"}, +] atomicwrites = [ {file = "atomicwrites-1.3.0-py2.py3-none-any.whl", hash = "sha256:03472c30eb2c5d1ba9227e4c2ca66ab8287fbfbbda3888aa93dc2e28fc6811b4"}, {file = "atomicwrites-1.3.0.tar.gz", hash = "sha256:75a9445bac02d8d058d5e1fe689654ba5a6556a1dfd8ce6ec55a0ed79866cfa6"}, @@ -1547,6 +1618,10 @@ beautifulsoup4 = [ {file = "beautifulsoup4-4.8.1-py3-none-any.whl", hash = "sha256:dcdef580e18a76d54002088602eba453eec38ebbcafafeaabd8cab12b6155d57"}, {file = "beautifulsoup4-4.8.1.tar.gz", hash = "sha256:6135db2ba678168c07950f9a16c4031822c6f4aec75a65e0a97bc5ca09789931"}, ] +black = [ + {file = "black-19.10b0-py36-none-any.whl", hash = "sha256:1b30e59be925fafc1ee4565e5e08abef6b03fe455102883820fe5ee2e4734e0b"}, + {file = "black-19.10b0.tar.gz", hash = "sha256:c2edb73a08e9e0e6f65a0e6af18b059b8b1cdd5bef997d7a0b181df93dc81539"}, +] certifi = [ {file = "certifi-2019.11.28-py2.py3-none-any.whl", hash = "sha256:017c25db2a153ce562900032d5bc68e9f191e44e9a0f762f373977de9df1fbb3"}, {file = "certifi-2019.11.28.tar.gz", hash = "sha256:25b64c7da4cd7479594d035c08c2d809eb4aab3a26e5a990ea98cc450c320f1f"}, @@ -1746,6 +1821,9 @@ flake8 = [ flake8-bandit = [ {file = "flake8_bandit-2.1.2.tar.gz", hash = "sha256:687fc8da2e4a239b206af2e54a90093572a60d0954f3054e23690739b0b0de3b"}, ] +flake8-black = [ + {file = "flake8-black-0.1.1.tar.gz", hash = "sha256:56f85aaa5a83f06a3f61e680e3b50f156b5e557ebdcb964d823d86f4c108b0c8"}, +] flake8-builtins = [ {file = "flake8-builtins-1.4.1.tar.gz", hash = "sha256:cd7b1b7fec4905386a3643b59f9ca8e305768da14a49a7efb31fe9364f33cd04"}, {file = "flake8_builtins-1.4.1-py2.py3-none-any.whl", hash = "sha256:8d806360767947c0035feada4ddef3ede32f0a586ef457e62d811b8456ad9a51"}, @@ -1876,6 +1954,9 @@ packaging = [ {file = "packaging-19.2-py2.py3-none-any.whl", hash = "sha256:d9551545c6d761f3def1677baf08ab2a3ca17c56879e70fecba2fc4dde4ed108"}, {file = "packaging-19.2.tar.gz", hash = "sha256:28b924174df7a2fa32c1953825ff29c61e2f5e082343165438812f00d3a7fc47"}, ] +pathspec = [ + {file = "pathspec-0.6.0.tar.gz", hash = "sha256:e285ccc8b0785beadd4c18e5708b12bb8fcf529a1e61215b3feff1d1e559ea5c"}, +] pbr = [ {file = "pbr-5.4.4-py2.py3-none-any.whl", hash = "sha256:61aa52a0f18b71c5cc58232d2cf8f8d09cd67fcad60b742a60124cb8d6951488"}, {file = "pbr-5.4.4.tar.gz", hash = "sha256:139d2625547dbfa5fb0b81daebb39601c478c21956dc57e2e07b74450a8c506b"}, @@ -2083,6 +2164,19 @@ qrcode = [ {file = "qrcode-6.1-py2.py3-none-any.whl", hash = "sha256:3996ee560fc39532910603704c82980ff6d4d5d629f9c3f25f34174ce8606cf5"}, {file = "qrcode-6.1.tar.gz", hash = "sha256:505253854f607f2abf4d16092c61d4e9d511a3b4392e60bff957a68592b04369"}, ] +regex = [ + {file = "regex-2019.12.9-cp27-none-win32.whl", hash = "sha256:40b7d1291a56897927e08bb973f8c186c2feb14c7f708bfe7aaee09483e85a20"}, + {file = "regex-2019.12.9-cp27-none-win_amd64.whl", hash = "sha256:c203c9ee755e9656d0af8fab82754d5a664ebaf707b3f883c7eff6a3dd5151cf"}, + {file = "regex-2019.12.9-cp35-none-win32.whl", hash = "sha256:719978a9145d59fc78509ea1d1bb74243f93583ef2a34dcc5623cf8118ae9726"}, + {file = "regex-2019.12.9-cp35-none-win_amd64.whl", hash = "sha256:75cf3796f89f75f83207a5c6a6e14eaf57e0369ef0ffff8e22bf36bbcfa0f1de"}, + {file = "regex-2019.12.9-cp36-none-win32.whl", hash = "sha256:3dbd8333fd2ebd50977ac8747385a73aa1f546eb6b16fcd83d274470fe11f243"}, + {file = "regex-2019.12.9-cp36-none-win_amd64.whl", hash = "sha256:ad9e3c7260809c0d1ded100269f78ea0217c0704f1eaaf40a382008461848b45"}, + {file = "regex-2019.12.9-cp37-none-win32.whl", hash = "sha256:91235c98283d2bddf1a588f0fbc2da8afa37959294bbd18b76297bdf316ba4d6"}, + {file = "regex-2019.12.9-cp37-none-win_amd64.whl", hash = "sha256:aaffd68c4c1ed891366d5c390081f4bf6337595e76a157baf453603d8e53fbcb"}, + {file = "regex-2019.12.9-cp38-none-win32.whl", hash = "sha256:e865bc508e316a3a09d36c8621596e6599a203bc54f1cd41020a127ccdac468a"}, + {file = "regex-2019.12.9-cp38-none-win_amd64.whl", hash = "sha256:77396cf80be8b2a35db863cca4c1a902d88ceeb183adab328b81184e71a5eafe"}, + {file = "regex-2019.12.9.tar.gz", hash = "sha256:77a3799152951d6d14ae5720ca162c97c64f85d4755da585418eac216b736cad"}, +] requests = [ {file = "requests-2.22.0-py2.py3-none-any.whl", hash = "sha256:9cf5292fcd0f598c671cfc1e0d7d1a7f13bb8085e9a590f48c010551dc6c4b31"}, {file = "requests-2.22.0.tar.gz", hash = "sha256:11e007a8a2aa0323f5a921e9e6a2d7e4e67d9877e85773fba9ba6419025cbeb4"}, diff --git a/pyproject.toml b/pyproject.toml index 27babcdb08fc8f44713665a63f15fe3116927a15..5c29094f56462268ab8dbf61b9b927310fcc65c0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -75,6 +75,12 @@ flake8-bandit = "^2.1.2" flake8-builtins = "^1.4.1" flake8-docstrings = "^1.5.0" flake8-rst-docstrings = "^0.0.12" +black = "^19.10b0" +flake8-black = "^0.1.1" + +[tool.black] +line-length = 100 +exclude = "/migrations/" [build-system] requires = ["poetry>=0.12"] diff --git a/tox.ini b/tox.ini index df4cbd73297920e40b98a9a82172fbb272d7d5d6..4424ba0b3d28b93cc9b3d55ec4ec3f9a3a92daba 100644 --- a/tox.ini +++ b/tox.ini @@ -33,6 +33,9 @@ commands = poetry build [testenv:docs] commands = poetry run make -C docs/ html {posargs} +[testenv:autoformat] +commands = poetry run black {posargs} biscuit/core/ + [flake8] max_line_length = 100 exclude = migrations,tests