Skip to content

Conversation

rruuaanng
Copy link
Contributor

@rruuaanng rruuaanng commented Apr 2, 2025

Add stub files (.pyi) for "edtlib.py" and "dtlib.py" to improve mypy static analysis and code completion.

@rruuaanng rruuaanng linked an issue Apr 2, 2025 that may be closed by this pull request
2 tasks
@rruuaanng rruuaanng force-pushed the add-edtlib-stub branch 5 times, most recently from c2902af to 0e5825d Compare April 2, 2025 05:16
@rruuaanng rruuaanng marked this pull request as ready for review April 2, 2025 05:28
@github-actions github-actions bot requested review from decsny and galak April 2, 2025 05:29
@rruuaanng rruuaanng requested a review from mbolivar April 2, 2025 05:29
@rruuaanng rruuaanng requested a review from pdgendt April 2, 2025 05:30
mbolivar
mbolivar previously approved these changes Apr 2, 2025
@rruuaanng
Copy link
Contributor Author

rruuaanng commented Apr 3, 2025

Let me restart the ci process.

Edit:

It seems to work.

@rruuaanng rruuaanng force-pushed the add-edtlib-stub branch 4 times, most recently from 3e33e91 to 78ea3fb Compare April 3, 2025 01:59
@rruuaanng
Copy link
Contributor Author

@mbolivar @pdgendt Please review it again!

@pdgendt
Copy link
Contributor

pdgendt commented Apr 3, 2025

Please review it again!

Hmn, with the ruff checks now added, I think it would be best to fix the following issues too:

# in .ruff-excludes.toml
"./scripts/dts/python-devicetree/src/devicetree/dtlib.py" = [
    "UP007",    # https://docs.astral.sh/ruff/rules/non-pep604-annotation
]
"./scripts/dts/python-devicetree/src/devicetree/edtlib.py" = [
    "UP007",    # https://docs.astral.sh/ruff/rules/non-pep604-annotation
]

So that the interface and actual implementation have the same declarations.

pdgendt
pdgendt previously approved these changes Apr 11, 2025
pdgendt
pdgendt previously approved these changes Apr 13, 2025
Copy link

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@github-actions github-actions bot added the Stale label Jun 15, 2025
@rruuaanng rruuaanng removed the Stale label Jun 15, 2025
Copy link

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@github-actions github-actions bot added the Stale label Aug 15, 2025
@rruuaanng rruuaanng removed the Stale label Aug 15, 2025
mbolivar
mbolivar previously approved these changes Sep 30, 2025
@henrikbrixandersen
Copy link
Member

@rruuaanng Please rebase on main and resolve any merge conflicts.

@rruuaanng
Copy link
Contributor Author

@henrikbrixandersen
I'll deal with it after the vacation :)

@mbolivar
Copy link
Contributor

mbolivar commented Oct 7, 2025

@rruuaanng can you please check CI and update again so we can get this in?

@rruuaanng rruuaanng force-pushed the add-edtlib-stub branch 2 times, most recently from 0de5321 to c362813 Compare October 8, 2025 08:08
Add stub files (.pyi) for "edtlib.py" and "dtlib.py" to
improve mypy static analysis and code completion.

Signed-off-by: James Roy <[email protected]>
@rruuaanng rruuaanng force-pushed the add-edtlib-stub branch 2 times, most recently from de707ab to 57fe48a Compare October 8, 2025 08:15
Add stub files (.pyi) for "edtlib.py" and "dtlib.py" to
improve mypy static analysis and code completion.

Signed-off-by: James Roy <[email protected]>
@kartben
Copy link
Contributor

kartben commented Oct 8, 2025

It feels like some documentation needs to be added as to how/when these files need to be regenerated?

@rruuaanng I think this never got addressed? How/when do you expect people to update these files? There's already good do's/don'ts at the top of dtlib/edtlib files so it would probably be good to add a not there w.r.t what people must do what they add new APIs etc

Copy link

sonarqubecloud bot commented Oct 8, 2025

Please retry analysis of this Pull-Request directly on SonarQube Cloud

@rruuaanng
Copy link
Contributor Author

It feels like some documentation needs to be added as to how/when these files need to be regenerated?

@rruuaanng I think this never got addressed? How/when do you expect people to update these files? There's already good do's/don'ts at the top of dtlib/edtlib files so it would probably be good to add a not there w.r.t what people must do what they add new APIs etc

Maybe I should mention that in the README. I'll add it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants