diff --git a/Pipfile b/Pipfile index 6b0c22c..f83bb5a 100644 --- a/Pipfile +++ b/Pipfile @@ -4,13 +4,13 @@ verify_ssl = true name = "pypi" [packages] -gitpython = "*" -isort = "*" -autoflake = "*" -black = "*" -flake8 = "*" -pylint = "*" -vulture = "*" +gitpython = "==3.1.*" +isort = "==5.10.*" +autoflake = "==1.4.*" +black = "==21.10b0" +flake8 = "==3.*" +pylint = "==2.11.*" +vulture = "==2.3.*" [dev-packages] pytest = "*" diff --git a/Pipfile.lock b/Pipfile.lock index 958e11c..0989fa2 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "ecf2c0be4133978263449a6c210a8fddea505978b094729b13046e987be28a1c" + "sha256": "ce8c0596f0dc850507388b0e2167e20981c3de8e5bae027a12221e4726a86b98" }, "pipfile-spec": 6, "requires": { @@ -18,11 +18,11 @@ "default": { "astroid": { "hashes": [ - "sha256:0755c998e7117078dcb7d0bda621391dd2a85da48052d948c7411ab187325346", - "sha256:1e83a69fd51b013ebf5912d26b9338d6643a55fec2f20c787792680610eed4a2" + "sha256:11f7356737b624c42e21e71fe85eea6875cb94c03c82ac76bd535a0ff10b0f25", + "sha256:abc423a1e85bc1553954a14f2053473d2b7f8baf32eae62a328be24f436b5107" ], "markers": "python_version ~= '3.6'", - "version": "==2.8.4" + "version": "==2.8.5" }, "autoflake": { "hashes": [ @@ -49,11 +49,11 @@ }, "flake8": { "hashes": [ - "sha256:479b1304f72536a55948cb40a32dce8bb0ffe3501e26eaf292c7e60eb5e0428d", - "sha256:806e034dda44114815e23c16ef92f95c91e4c71100ff52813adf7132a6ad870d" + "sha256:07528381786f2a6237b061f6e96610a4167b226cb926e2aa2b6b1d78057c576b", + "sha256:bf8fd333346d844f616e8d47905ef3a3384edae6b4e9beb0c5101e25e3110907" ], "index": "pypi", - "version": "==4.0.1" + "version": "==3.9.2" }, "gitdb": { "hashes": [ @@ -138,19 +138,19 @@ }, "pycodestyle": { "hashes": [ - "sha256:720f8b39dde8b293825e7ff02c475f3077124006db4f440dcbc9a20b76548a20", - "sha256:eddd5847ef438ea1c7870ca7eb78a9d47ce0cdb4851a5523949f2601d0cbbe7f" + "sha256:514f76d918fcc0b55c6680472f0a37970994e07bbb80725808c17089be302068", + "sha256:c389c1d06bf7904078ca03399a4816f974a1d590090fecea0c63ec26ebaf1cef" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", - "version": "==2.8.0" + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==2.7.0" }, "pyflakes": { "hashes": [ - "sha256:05a85c2872edf37a4ed30b0cce2f6093e1d0581f8c19d7393122da7e25b2b24c", - "sha256:3bb3a3f256f4b7968c9c788781e4ff07dce46bdf12339dcda61053375426ee2e" + "sha256:7893783d01b8a89811dd72d7dfd4d84ff098e5eed95cfa8905b22bbffe52efc3", + "sha256:f5bc8ecabc05bb9d291eb5203d6810b49040f6ff446a756326104746cc00c1db" ], "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", - "version": "==2.4.0" + "version": "==2.3.1" }, "pylint": { "hashes": [ @@ -240,12 +240,10 @@ }, "typing-extensions": { "hashes": [ - "sha256:49f75d16ff11f1cd258e1b988ccff82a3ca5570217d7ad8c5f48205dd99a677e", - "sha256:d8226d10bc02a29bcc81df19a26e56a9647f8b0a6d4a83924139f4a8b01f17b7", - "sha256:f1d25edafde516b146ecd0613dabcc61409817af4766fbbcfb8d1ad4ec441a34" + "sha256:829704698b22e13ec9eaf959122315eabb370b0884400e9818334d8b677023d9" ], "markers": "python_version < '3.10'", - "version": "==3.10.0.2" + "version": "==4.0.0" }, "vulture": { "hashes": [ diff --git a/README.md b/README.md index b2c8989..da0ffa3 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,22 @@ It will do: Obeys `.flake8`, `.pylintrc` and `whitelist.py` config files in the current directory. +# Usage +* install [`pipx`](https://github.com/pypa/pipx): +```bash +python3 -m pip install --user pipx +python3 -m pipx ensurepath +``` +* Install [`gadd`](https://pypi.org/project/gadd/) with `pipx`: +```bash +pipx install gadd +``` +* Stage file to test: +```bash +git add some_file.py +gadd +``` + # Tutorial This is quick tutorial on hoe to create `pip` installable Python CLI tool. diff --git a/pyproject.toml b/pyproject.toml index 87f209f..8b07f3b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "gadd" -version = "0.2.0" +version = "0.2.1" description = "Sort imports, remove unused imports, run Black, flake8, pylint, vulture in one go for al staged .py files" authors = ["Almaz Kunpeissov "] keywords = ["Black", "Sort imports", "analysis", "automation", "autopep8", "code", "flake8", "formatter", "gofmt", "lint", "linter", "pyfmt", "pylint", "python", "remove unused imports", "rustfmt", "static", "vulture", "yapf"] @@ -22,7 +22,7 @@ classifiers = [ python = "^3.6" autoflake = "==1.4.*" black = "==21.10b0" -flake8 = "==4.0.*" +flake8 = "==3.*" gitpython = "==3.1.*" isort = "==5.10.*" pylint = "==2.11.*"