unimport icon indicating copy to clipboard operation
unimport copied to clipboard

:rocket: The ultimate linter and formatter for removing unused import statements in your code.

Results 19 unimport issues
Sort by recently updated
recently updated
newest added

> this control is tox you can also provide with or let's say you are refactoring a project, unimport, black, and isort will make your job easier. https://github.com/hakancelikdev/unimport/blob/d3de2aa32852b5794a8eac28af5787bc886f58de/docs/faq.md#long-answer

documentation
waiting for response

https://www.python.org/dev/peps/pep-0634/ Is there an import used in the match statement? analysis should be added.

enhancement
changelog

With 0.7.4 and --remove --include-star-import --ignore-init --gitignore In code like this def bob(): print(sys.path) import sys The import gets incorrectly removed. You might reasonably ask why I even had code...

bug
discussion
changelog

I have a python file like that; ```python import __hello__ ``` when I run this file I am getting an output like that; ```sh Hello world! ``` but ```unimport``` is...

discussion

This line https://github.com/unimport/unimport/blob/27f421d5f83dee28d7c996db76573ffef8e782cf/unimport/main.py#L196 lead to this error: ``` Traceback (most recent call last): File "C:\redacted\Scripts\unimport-script.py", line 33, in sys.exit(load_entry_point('unimport==0.7.4', 'console_scripts', 'unimport')()) File "c:\redacted\lib\site-packages\unimport\main.py", line 194, in main print( File "C:\redacted\Python38\lib\encodings\cp1252.py",...

bug
waiting for response

First, thanks for an awesome project! I'm working on a sizeable refactor, and wanted a modernized version of autoflake8. A quick run of `unimport -r src/**/*.py` saved me a lot...

documentation
enhancement
changelog

## Code ```python # Python imports import os from typing import Union # Local imports from .pgen2 import token from .pgen2 import driver from .pgen2.grammar import Grammar os, Union, driver,...

enhancement
changelog
test

## Problem An import like `import module.submodule` is removed when `module.submodule` is not used 1:1. However, we may use `module.other_submodule` or `module.some_other_name` in the file, which then becomes invalid and...

bug
changelog

```py from _collections import * from collections import * print(defaultdict) ``` Unimport works fine when it comes to finding the correct import module for the variables, but this doesn't help...

bug
changelog