python / python/typeshed

Automatization idea: find duplicated constants

Open
#7,067 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

project: policy
Dominant language
Python
Stars
5.1k
Forks
2.1k
Avg merge
1d 19h
Merged PRs (30d)
82

Description

Context: https://github.com/python/typeshed/pull/7065

Sometimes python / stubs do re-export constans from other modules.
In this case we can:

  1. Use re-export as well (correct option)
  2. Duplicate these constants (ok-ish, but not great)

Right now we do nothing to detect the second case.
I guess, that we can improve this!

We can write some kind of non-blocking helper who searches related modules for constants with the same names and suggests to re-use them if needed.

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.

Research direction

Start with the context in python/typeshed pull request 7065 and review how related modules re-export constants. Then determine the scope of a non-blocking helper that finds duplicated constant names and suggests reuse; done means the approach and expected behavior are defined well enough to implement.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.