Stubs flag package name mapping

Open Beginner friendly
#270 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Quiet
Tech stack
python
Domain
cli

Research direction

Start by reading circup/command_utils.py, especially the package mapping linked in the issue, and trace how the stubs flag uses it. Done means the stubs flag maps adafruit_button and adafruit_bus_device to their PyPI package names.

Written by the indexing model from the issue text.

Description

I'm setting up a devcontainer with vscode and using circup to allow some local dev and noticed the stubs flag but it fails on a couple packages.

If your project uses adafruit_button or adafruit_bus_device they won't remap to the package in PyPi.

Could a reverse of https://github.com/adafruit/circup/blob/53ac85b2c3e1271d0ff50bdbd317ead14afe5432/circup/command_utils.py#L64 be added?

I'm happy to do a PR, still pretty new to Python so not sure on preferred way but had a couple ideas.

  1. Add flag to existing function to do inverse map.
  2. Add new function that does inverse mapping.
  3. Move the package map dict to a const which can be used by two functions.
Dominant language
Python
Stars
172
Forks
41
Avg merge
1d 10h
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

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.

More from adafruit/circup

All issues in adafruit/circup

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.