Skip to content

Fix missing Optional type hint in config.py#795

Merged
Borda merged 5 commits intoroboflow:developfrom
sjhddh:fix/config-type-hint
Apr 8, 2026
Merged

Fix missing Optional type hint in config.py#795
Borda merged 5 commits intoroboflow:developfrom
sjhddh:fix/config-type-hint

Conversation

@sjhddh
Copy link
Copy Markdown
Contributor

@sjhddh sjhddh commented Mar 11, 2026

Changed class_names: List[str] = None to class_names: Optional[List[str]] = None in rfdetr/config.py to fix type checker error.


Automated PR created by OpenClaw daily-pr routine (Backlog queue).

Borda and others added 2 commits March 7, 2026 17:26
RF-DETR PyTorch Lightning Migration 1/2
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.15.4 → v0.15.5](astral-sh/ruff-pre-commit@v0.15.4...v0.15.5)
- [github.com/codespell-project/codespell: v2.4.1 → v2.4.2](codespell-project/codespell@v2.4.1...v2.4.2)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Mar 11, 2026

CLA assistant check
All committers have signed the CLA.

@Borda
Copy link
Copy Markdown
Member

Borda commented Mar 11, 2026

@sjhddh seems you started from wrong branch, pls read the contribution guide... So pls rebase develop or cherry pick on top of it and push again...

@Borda Borda marked this pull request as draft March 11, 2026 06:53
@sjhddh sjhddh force-pushed the fix/config-type-hint branch from ffaff06 to af8e96f Compare March 11, 2026 07:17
@sjhddh
Copy link
Copy Markdown
Contributor Author

sjhddh commented Mar 11, 2026

@Borda I have rebased the PR onto the develop branch and fixed the commit author settings to resolve the CLA check. Thank you for the heads up!

@Borda
Copy link
Copy Markdown
Member

Borda commented Mar 11, 2026

CLA assistant check Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.

@sjhddh ^^

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79%. Comparing base (d9f6be3) to head (1d37efa).
⚠️ Report is 1 commits behind head on develop.

Additional details and impacted files
@@          Coverage Diff           @@
##           develop   #795   +/-   ##
======================================
  Coverage       79%    79%           
======================================
  Files           97     97           
  Lines         7793   7793           
======================================
  Hits          6148   6148           
  Misses        1645   1645           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sjhddh
Copy link
Copy Markdown
Contributor Author

sjhddh commented Mar 20, 2026

Just pinging on this! The PR has been updated and rebased onto develop, and the CLA is signed. Let me know if there's anything else needed.

@Borda
Copy link
Copy Markdown
Member

Borda commented Mar 23, 2026

CLA is signed. Let me know if there's anything else needed.

@sjhddh it is not updated yet, so can you pls share print-screen 🐰

@Borda
Copy link
Copy Markdown
Member

Borda commented Apr 8, 2026

@sjhddh, friendly ping, do you think you will have a chance to finish this one? 🦝

@sjhddh
Copy link
Copy Markdown
Contributor Author

sjhddh commented Apr 8, 2026

@Borda Yes, definitely want to get this finished! 🙋

Regarding the CLA — I've signed it via the CLA assistant link. The status might be stale. Let me trigger a recheck.

If there's anything else needed on the code side, happy to update. The change itself is minimal (adding the missing Optional type hint for class_names in config.py).

@Borda
Copy link
Copy Markdown
Member

Borda commented Apr 8, 2026

Regarding the CLA — I've signed it via the CLA assistant link. The status might be stale. Let me trigger a recheck.

all green now, perfect!

@Borda Borda marked this pull request as ready for review April 8, 2026 18:49
Copilot AI review requested due to automatic review settings April 8, 2026 18:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a typing mismatch in the training configuration model by making class_names explicitly nullable, aligning the type hint with its None default and preventing type-checker errors.

Changes:

  • Updated TrainConfig.class_names from List[str] to Optional[List[str]] while keeping the default as None.

@Borda Borda merged commit 3f3bab3 into roboflow:develop Apr 8, 2026
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants