- Python 3.13 support
- Get rid of deprecated actions
- Add dependabot config
- pre-commit autoupdate
- Make notebook support and dependencies optional
- Valid pre-commit tag in README example
- Pre commit updates
- pre-commit autoupdate
- Fix pytest config to run doctests
- removestar can now be used to get rid of * imports in jupyter
notebooks (
.ipynb
files)
- Fix typos in
README.md
- GitHub Actions: Add Python 3.12 release candidate to the testing
- Ruff: Set upper limits on code complexity
- Pre-commit autoupdate
- removestar can now be used as a pre-commit hook.
- removestar now outputs colored text.
- Turn off verbose output for pre-commit hook.
- Add git archive support for auto versioning.
- Use utf-8 encoding in the command line interface.
- Use trusted publisher deployment for PyPI uploads.
- Revamp the CI pipeline and create a CD pipeline.
- Enable pre-commit for formatting and linting.
- Migrate the build-backend to
hatch
and usehatch-vcs
for versioning, getting rid ofsetup.py
,setup.cfg
,MANIFEST.in
,versioneer.py
,conftest.py
,pytest.ini
, and introducingpyproject.toml
/ - Move the tests directory out of the removestar directory.
- Ruff: Ignore a new pylint rule.
- Upgrade linter from pyflakes to ruff.
- Upgrade GitHub Actions.
- Add
project_urls
to the metadata.
- Fix the line wrapping logic to always wrap import lines if they are greater than the max line length (previously it would not account for the last imported name in the line).
- Lines with star imports can now contain comments.
- Star imports can be whitelisted using
# noqa
comments. - Replaced Travis CI with GitHub Actions.
Thanks to @h4l for these improvements.
- Fix an incorrectly done release from 1.2.3.
- Fix unformatted module name placeholder in "Could not find the star imports" warning (thanks to @h4l).
- Names that are used more than once no longer produce duplicate imports.
- Files are no longer read redundantly.
- Files are no longer written into if the code does not change.
- A blank line is no longer printed for empty diffs.
- Imports that are completely removed are no longer replaced with a blank line.
- removestar now works correctly with recursive star imports. In particular,
from .submod import *
now works when submod is a submodule whose__init__.py
itself usesimport *
(removestar still skips__init__.py
files by default). __all__
is now respected.- The full path to the file is printed for
--verbose
messages. - Catch all errors when importing external modules dynamically.
- Better error message for same-module absolute imports that don't exist.
- Don't consider
__builtins__
to be imported from external modules (even though it technically is). - Make sure pytest-doctestplus is installed when running the tests.
- Include the LICENSE file in the distribution and the setup.py metadata.
- Add
--verbose
and--quiet
flags.--verbose
prints about every name that an import is added for.--quiet
hides all warning output. - Add support for absolute imports. Absolute imports from the same module are
scanned statically, the same as relative imports. Absolute imports from
external modules are imported dynamically to get the list of names. This can
be disabled with the flag
--no-dynamic-importing
. - Add
--max-line-length
to control the line length at which imports are wrapped. The default is 100. It can be disabled withremoevstar --max-line-length 0
. - No longer stop traversing a directory when encountering a file with invalid syntax.
- Fix logic for wrapping long imports
- Fix the filename in some error messages.
- Add tests.
- Move all TODOs to the GitHub issue tracker.
- Automatically skip non-.py files
- Automatically skip
__init__.py
- Add flag
--no-skip-init
to not skip__init__.py
- Fix directory recursion
- Fix multiline import logic
Initial release