Convert factory functions to proper python classes
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 107
- Forks
- 45
- Avg merge
- 13h 41m
- Merged PRs (30d)
- 7
Description
Aggdraw seems to define all of its class __new__ methods as functions in the aggdraw module. It then creates a new object by creating a new type. This is an issue because this means classes like aggdraw.Draw aren't actually classes, they are functions, and that a user has no access to the methods without creating an instance of the object. Even worse you can't use sphinx autodoc functionality to document the classes because they don't technically exist until an instance is made.
I don't think this will be extremely hard to implement, but it isn't a top priority for me. Additionally, it has a high chance of breaking something.
Contributor guide
No contributing guide indexed for this repository
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
Start by locating the aggdraw module's new definitions and the implementations of exposed objects such as aggdraw.Draw. Check how those objects are currently created and how existing tests exercise them; done means the exposed objects are proper classes and remain compatible with current behavior while allowing autodoc to inspect them.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python
- Domain
- developer-experience, documentation
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100