Naming Convention Violations in OpenCV Python Bindings
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 5.4k
- Forks
- 1k
- Avg merge
- 22h 17m
- Merged PRs (30d)
- 3
Description
Naming conventions are important for readability, and as the title implies, this package does not comply with the PEP 8 naming conventions. As a result, the code can be harder to read, maintain, and integrate with other Python projects that follow standard conventions, leading to inconsistencies, increased learning curves for new developers, and potential for misinterpretation or errors.
A practical solution would be to introduce name aliases to allow backwards compatibility, but also give the choice to pursue the style of modern projects. Another option would be to do something like the threading module does:
def current_thread():
"""Return the current Thread object, corresponding to the caller's thread of control.
If the caller's thread of control was not created through the threading
module, a dummy thread object with limited functionality is returned.
"""
try:
return _active[get_ident()]
except KeyError:
return _DummyThread()
def currentThread():
"""Return the current Thread object, corresponding to the caller's thread of control.
This function is deprecated, use current_thread() instead.
"""
import warnings
warnings.warn('currentThread() is deprecated, use current_thread() instead',
DeprecationWarning, stacklevel=2)
return current_thread()
Are there any thoughts on addressing this issue?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue does not name specific binding files, symbols, or tests. Start by locating the Python binding definitions that expose non-PEP 8 names, then review existing compatibility and deprecation patterns; done would require an agreed naming scope, aliases or deprecations, and corresponding tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100