MattIPv4 / MattIPv4/PyDMXControl

TypeError in web/_routes.py

Open
#46 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
143
Forks
23
PR merge metrics
No merged PRs in 30d

Description

web/_routes.py contains `Colors.to_hex(this_fixture.get_color())` a few times, and there's no type known for `this_fixture` (in pyright, at least).

If that type were annotated, you'd get an early warning that` get_color()` can return None, but `to_hex` can't take None.

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 in web/_routes.py by reading the occurrences of Colors.to_hex(this_fixture.get_color()) and tracing the type of this_fixture and the possible return value of get_color(). Run pyright on the affected code; done means the fixture type is known and the potential None passed to to_hex is identified by static checking.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.