prompt-toolkit / prompt-toolkit/python-prompt-toolkit

Replace absolute imports with relative imports

Open
#698 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Python
Stars
10.6k
Forks
815
PR merge metrics
No merged PRs in 30d

Description

I'd like to use 2.0 in a project of mine, but I rely on some packages that don't yet support it, so my intent is to temporarily bundle prompt_toolkit as a subpackage until these issues clear themselves up. When trying to do this, I discovered many absolute imports that could/should be rewritten as package-relative, e.g. in application.py.

Would you be willing to accept a PR that replaces the absolute imports of prompt_toolkit.x with relative imports? I'd stick to the library code and wouldn't touch examples/tests/etc.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with prompt_toolkit/application/application.py and search the library code for imports beginning with prompt_toolkit.x. Review the surrounding package structure before changing them, and consider the existing test suite for regressions. Done means the library's absolute prompt_toolkit imports are replaced with relative imports while examples and tests remain untouched.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.