adafruit / adafruit/circup

Stubs flag package name mapping

Open Beginner friendly
#270 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
172
Forks
41
Avg merge
1d 20h
Merged PRs (30d)
1

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.

Contributor guide

Open the contributing guide

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.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.