Use forward references for Python classes

Open Beginner friendly
#5,694 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
72/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Stale
Tech stack
python
Domain
tooling

Research direction

Open the definitions around lines 129 and 165 and confirm that Feedback and GeneratedComment are already defined before their use. Remove the unnecessary string quoting as described, then verify that the project still imports and its checks pass.

Written by the indexing model from the issue text.

Description

The relationship definition uses 'GeneratedComment' as a string but the class is defined in the same file. While forward references work, it's more consistent to use the actual class since it's already defined above. Change line 129 from 'Feedback' to Feedback and line 165 from 'GeneratedComment' to GeneratedComment (without quotes).

Originally posted by @Copilot in #5684

Dominant language
Python
Stars
570
Forks
351
Avg merge
2d 13h
Merged PRs (30d)
65

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.

More from mozilla/bugbug

All issues in mozilla/bugbug

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.