Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump 1.7.0 #156

Merged
merged 3 commits into from
Oct 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ To remove unused variables, use the ``--remove-unused-variables`` option.
Below is the full listing of options:

```
usage: autoflake [-h] [-c] [-r] [-j n] [--exclude globs] [--imports IMPORTS] [--expand-star-imports] [--remove-all-unused-imports] [--ignore-init-module-imports] [--remove-duplicate-keys]
[--remove-unused-variables] [--version] [--quiet] [-v] [--stdin-display-name STDIN_DISPLAY_NAME] [-i | -s]
usage: autoflake [-h] [-c | -cd] [-r] [-j n] [--exclude globs] [--imports IMPORTS] [--expand-star-imports] [--remove-all-unused-imports] [--ignore-init-module-imports] [--remove-duplicate-keys] [--remove-unused-variables]
[--remove-rhs-for-unused-variables] [--ignore-pass-statements] [--ignore-pass-after-docstring] [--version] [--quiet] [-v] [--stdin-display-name STDIN_DISPLAY_NAME] [--config CONFIG_FILE] [-i | -s]
files [files ...]

Removes unused imports and unused variables as reported by pyflakes.
Expand All @@ -96,6 +96,7 @@ positional arguments:
options:
-h, --help show this help message and exit
-c, --check return error code if changes are needed
-cd, --check-diff return error code if changes are needed, also display file diffs
-r, --recursive drill down directories recursively
-j n, --jobs n number of parallel jobs; match CPU count if value is 0 (default: 0)
--exclude globs exclude file/directory names that match these comma-separated globs
Expand All @@ -106,23 +107,22 @@ options:
remove all unused imports (not just those from the standard library)
--ignore-init-module-imports
exclude __init__.py when removing unused imports
--ignore-pass-statements
keep all `pass` statements
--ignore-pass-after-docstring
keep `pass` statements after a new line ending on """
--remove-duplicate-keys
remove all duplicate keys in objects
--remove-unused-variables
remove unused variables
--remove-rhs-for-unused-variables
remove RHS of statements when removing unused variables (unsafe)
--ignore-pass-statements
ignore all pass statements
--ignore-pass-after-docstring
ignore pass statements after a newline ending on '"""'
--version show program's version number and exit
--quiet Suppress output if there are no issues
-v, --verbose print more verbose logs (you can repeat `-v` to make it more verbose)
--stdin-display-name STDIN_DISPLAY_NAME
the name used when processing input from stdin
--config CONFIG_FILE
Explicitly set the config file instead of auto determining based on file location
--config CONFIG_FILE Explicitly set the config file instead of auto determining based on file location
-i, --in-place make changes to files instead of printing diffs
-s, --stdout print changed text to stdout. defaults to true when formatting stdin, or to false otherwise
```
Expand Down Expand Up @@ -201,7 +201,7 @@ Add the following to your `.pre-commit-config.yaml`

```yaml
- repo: https://github.com/PyCQA/autoflake
rev: v1.6.1
rev: v1.7.0
hooks:
- id: autoflake
```
3 changes: 2 additions & 1 deletion autoflake.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
import pyflakes.reporter


__version__ = "1.6.1"
__version__ = "1.7.0"


_LOGGER = logging.getLogger("autoflake")
Expand Down Expand Up @@ -1224,6 +1224,7 @@ def merge_configuration_file(args):
setattr(args, name, value)
elif name in {
"check",
"check_diff",
"expand-star-imports",
"ignore-init-module-imports",
"ignore-pass-after-docstring",
Expand Down