diff --git a/docs/encryption.md b/docs/encryption.md index 31f64502..6dae9a48 100644 --- a/docs/encryption.md +++ b/docs/encryption.md @@ -140,7 +140,6 @@ import argparse from Crypto.Cipher import AES import getpass import hashlib -import sys parser = argparse.ArgumentParser() parser.add_argument("filepath", help="journal file to decrypt") diff --git a/poetry.lock b/poetry.lock index 9e724658..eda94884 100644 --- a/poetry.lock +++ b/poetry.lock @@ -178,6 +178,14 @@ category = "dev" optional = false python-versions = "*" +[[package]] +name = "entrypoints" +version = "0.4" +description = "Discover and load entry points from installed packages." +category = "dev" +optional = false +python-versions = ">=3.6" + [[package]] name = "execnet" version = "1.9.0" @@ -222,6 +230,25 @@ mccabe = ">=0.6.0,<0.7.0" pycodestyle = ">=2.8.0,<2.9.0" pyflakes = ">=2.4.0,<2.5.0" +[[package]] +name = "flakeheaven" +version = "3.2.0" +description = "FlakeHeaven is a [Flake8](https://gitlab.com/pycqa/flake8) wrapper to make it cool." +category = "dev" +optional = false +python-versions = ">=3.7,<4.0" + +[package.dependencies] +colorama = "*" +entrypoints = "*" +flake8 = ">=4.0.1,<5.0.0" +pygments = "*" +toml = "*" +urllib3 = "*" + +[package.extras] +docs = ["alabaster", "myst-parser (>=0.18.0,<0.19.0)", "pygments-github-lexers", "sphinx"] + [[package]] name = "ghp-import" version = "2.1.0" @@ -713,18 +740,6 @@ python-versions = ">=3.6.8" [package.extras] diagrams = ["jinja2", "railroad-diagrams"] -[[package]] -name = "pyproject-flake8" -version = "0.0.1a5" -description = "pyproject-flake8 (`pflake8`), a monkey patching wrapper to connect flake8 with pyproject.toml configuration" -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -flake8 = "<5.0.0" -tomli = {version = "*", markers = "python_version < \"3.11\""} - [[package]] name = "pytest" version = "7.1.2" @@ -1128,7 +1143,7 @@ testing = ["func-timeout", "jaraco.itertools", "pytest (>=6)", "pytest-black (>= [metadata] lock-version = "1.1" python-versions = ">=3.9.0, <3.12" -content-hash = "c9bebe280520ae31feec25f734a8404eee0e0f3b3691e9e7e75af0c54a1b02db" +content-hash = "57ed0eb87ee7fe21231b53feb5e4bfdcd154bbb91e52c38d484ab193ff582ec8" [metadata.files] ansiwrap = [ @@ -1297,6 +1312,10 @@ distlib = [ {file = "distlib-0.3.5-py2.py3-none-any.whl", hash = "sha256:b710088c59f06338ca514800ad795a132da19fda270e3ce4affc74abf955a26c"}, {file = "distlib-0.3.5.tar.gz", hash = "sha256:a7f75737c70be3b25e2bee06288cec4e4c221de18455b2dd037fe2a795cab2fe"}, ] +entrypoints = [ + {file = "entrypoints-0.4-py3-none-any.whl", hash = "sha256:f174b5ff827504fd3cd97cc3f8649f3693f51538c7e4bdf3ef002c8429d42f9f"}, + {file = "entrypoints-0.4.tar.gz", hash = "sha256:b706eddaa9218a19ebcd67b56818f05bb27589b1ca9e8d797b74affad4ccacd4"}, +] execnet = [ {file = "execnet-1.9.0-py2.py3-none-any.whl", hash = "sha256:a295f7cc774947aac58dde7fdc85f4aa00c42adf5d8f5468fc630c1acf30a142"}, {file = "execnet-1.9.0.tar.gz", hash = "sha256:8f694f3ba9cc92cab508b152dcfe322153975c29bda272e2fd7f3f00f36e47c5"}, @@ -1313,6 +1332,10 @@ flake8 = [ {file = "flake8-4.0.1-py2.py3-none-any.whl", hash = "sha256:479b1304f72536a55948cb40a32dce8bb0ffe3501e26eaf292c7e60eb5e0428d"}, {file = "flake8-4.0.1.tar.gz", hash = "sha256:806e034dda44114815e23c16ef92f95c91e4c71100ff52813adf7132a6ad870d"}, ] +flakeheaven = [ + {file = "flakeheaven-3.2.0-py3-none-any.whl", hash = "sha256:ec5a508c3db64d73128b65cb2a5a2c0a2d9f2e4b435e9fa2bcc03bf0df86da79"}, + {file = "flakeheaven-3.2.0.tar.gz", hash = "sha256:225333d7bf309079f19a2c5f02d427fc7558a0d0c065944de88041ca94f5525c"}, +] ghp-import = [ {file = "ghp-import-2.1.0.tar.gz", hash = "sha256:9c535c4c61193c2df8871222567d7fd7e5014d835f97dc7b7439069e2413d343"}, {file = "ghp_import-2.1.0-py3-none-any.whl", hash = "sha256:8337dd7b50877f163d4c0289bc1f1c7f127550241988d568c1db512c4324a619"}, @@ -1516,10 +1539,6 @@ pyparsing = [ {file = "pyparsing-3.0.9-py3-none-any.whl", hash = "sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"}, {file = "pyparsing-3.0.9.tar.gz", hash = "sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb"}, ] -pyproject-flake8 = [ - {file = "pyproject-flake8-0.0.1a5.tar.gz", hash = "sha256:22542080ba90d4bd80ee060852db15a24aeea61c9a29ed7c16f5b59b0e47a03a"}, - {file = "pyproject_flake8-0.0.1a5-py2.py3-none-any.whl", hash = "sha256:c843d760c49d7b270e9abda58a57765c031918a9d10da25aa43572f5d77cac43"}, -] pytest = [ {file = "pytest-7.1.2-py3-none-any.whl", hash = "sha256:13d0e3ccfc2b6e26be000cb6568c832ba67ba32e719443bfe725814d3c42433c"}, {file = "pytest-7.1.2.tar.gz", hash = "sha256:a06a0425453864a270bc45e71f783330a7428defb4230fb5e6a731fde06ecd45"}, diff --git a/pyproject.toml b/pyproject.toml index 3ed885c8..8828520e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,11 +44,11 @@ tzlocal = ">=4.0" # https://github.com/regebro/tzlocal/blob/master/CHANGES.txt [tool.poetry.dev-dependencies] black = { version = ">=21.5b2", allow-prereleases = true } +flakeheaven = ">=3.0" ipdb = "*" isort = ">=5.10" mkdocs = ">=1.0,<1.3" poethepoet = "*" -pyproject-flake8 = "*" pytest = ">=6.2" pytest-bdd = ">=4.0.1,<6.0" pytest-clarity = "*" @@ -70,8 +70,9 @@ format-check = [ {cmd = "black --check --diff ."}, ] style-check = [ - {cmd = "pflake8 --version"}, - {cmd = "pflake8 jrnl tests tasks.py"}, + {cmd = "flakeheaven --version"}, + {cmd = "flakeheaven plugins"}, + {cmd = "flakeheaven lint"}, ] sort-run = [ {cmd = "isort ."}, @@ -150,9 +151,25 @@ filterwarnings = [ "ignore:[WinError 5].*" ] -[tool.flake8] -# ignore formatting warnings and errors because we use Black to autoformat -extend-ignore = "E101,E111,E114,E115,E116,E117,E12,E13,E2,E3,E401,E5,E70,W1,W2,W3,W5" +[tool.flakeheaven] +max_line_length = 88 +exclude = [".git", ".tox", ".venv", "node_modules"] + +[tool.flakeheaven.plugins] +"py*" = ["+*"] +pycodestyle = [ + "-E101", + "-E111", "-E114", "-E115", "-E116", "-E117", + "-E12*", + "-E13*", + "-E2*", + "-E3*", + "-E401", + "-E5*", + "-E70", + "-W1*", "-W2*", "-W3*", "-W5*", +] + [build-system] requires = ["poetry-core>=1.0.0"]