lordmauve / lordmauve/pgzero

Add __dir__() to built-in objects

Open
#101 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue
Dominant language
Python
Stars
611
Forks
211
PR merge metrics
No merged PRs in 30d

Description

The REPL added in #80 has built-in autocompletion:

autocompletion

However various built-in objects do not take full advantage of this:

  • Actor does not have autocompletion for attributes delegated to the ZRect
  • Loaders do not have autocompletion for the objects that can be loaded
  • more?

We should implement __dir__() on these classes and others to ensure that autocompletion lists all valid attributes.

Contributor guide

No contributing guide indexed for this repository

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 REPL autocompletion implementation, then inspect the Actor and loader classes mentioned in the issue. Add dir() support so delegated Actor attributes and loadable objects appear in completion, and verify that the REPL lists all valid attributes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.