ehmatthes / ehmatthes/py-bugger

Refining ModuleNotFoundError

Open
#3 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
41
Forks
22
PR merge metrics
No merged PRs in 30d

Description

Polish this, and then start working on other exceptions.

- [x] Write an e2e test.
- [x] Run on Linux.
- [x] Run on Windows.
- [x] Update README to try out on Pillow?
- [x] Update README to install from PyPI.
- [x] Should modify only one import statement. Running against Pillow/src/PIL modifies all three plain import statements.
- [x] failing test (test file with two imports, should change only one)
- [x] pass the test
- [x] Find all target elements, and choose one at random to modify.
- [x] Implement a `--num-bugs` to introduce.
- [x] failing test
- [x] pass the test
- [x] Consider implementing CLI with click; it's likely to grow larger than I want to manage with stdlib.
- [x] Parse all .py files not in .gitignore.
- [x] Start a utils/ dir, and a set of utils functions.
- [x] Target random .py files, not just first one found. (#14)
- [x] Support `--target-file`.
- [ ] Try supporting `-e IndexError`?
- [x] Make a 0.2 release, share.
- [x] Make a 541 request? [opened](https://github.com/pypi/support/issues/5976) 3/25/25
- [ ] Move cli files to a separate `cli/` dir, with a utils file.
- [ ] Move CST classes to a separate module.
- [x] `add_typo(name)` - Add a typo to a legal python identifier.
- [ ] Remove a char (if len(name) > 1)
- [ ] Add a char
- [ ] Replace a char
- [ ] Add an illegal symbol
- [ ] Replace _ with -.
- [ ] But, make sure the intended exception is induced. ie, don't add a hyphen if that becomes a syntax error. (Maybe check the args, and if SyntaxError not in args, don't make that kind of change.)
- [ ] Keep a clean main file.
- [ ] Move most logic to other modules and subdirs.
- [ ] Finish logic for simple imports.
- [ ] Find all imports before choosing which to modify.
- [x] Add an arg for modifying more than one. (post 1.0)
- [ ] Maybe parse all nodes before focusing on specific modifications.
- [ ] Manage git.
- [ ] Make sure .git dir.
- [ ] Make sure clean commit.
- [ ] Make a commit after modifying files.
- [x] Make an initial release.
- [ ] Share this, for early feedback.
- [ ] Call out silly [SO post](https://stackoverflow.com/questions/3445429/intentionally-buggy-code-python).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.