Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge remaining changes from '24 #642

Open
wants to merge 52 commits into
base: EOY_mpflash
Choose a base branch
from
Open

Merge remaining changes from '24 #642

wants to merge 52 commits into from

Conversation

Josverl
Copy link
Owner

@Josverl Josverl commented Jan 2, 2025

mpflash

Stubber

Common

  • settings
  • cspell additional words

Documentation

  • WIP.md of remaining taska

reference-stubs

  • Add prepare_source_stubs.ipynb to create reference-stubs

Signed-off-by: Jos Verlinde Jos_Verlinde@hotmail.com

Josverl added 30 commits July 8, 2024 16:27
… manifest imports for some of the ARDUINO boards

fixes #591

Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
…foo/__init__.pyi

Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Fix spelling

Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
…ameters

Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
- Updated the `_type_from_context` function to handle method/function/class signatures more accurately.
- Modified the lookup process to avoid repeated names in module and item names.
- Improved the parsing of docstrings to extract return types.

Fixes #123

Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
…t version

Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Josverl added 16 commits January 1, 2025 17:21
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
@Josverl Josverl self-assigned this Jan 2, 2025
@Josverl Josverl added mpflash Flashing tool for Micropython stubber MicroPython-stubber CLI labels Jan 2, 2025
@Josverl Josverl requested a review from Copilot January 2, 2025 17:01
@Josverl Josverl marked this pull request as ready for review January 2, 2025 17:02

Choose a reason for hiding this comment

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

Copilot reviewed 100 out of 115 changed files in this pull request and generated no comments.

Files not reviewed (15)
  • .vscode/launch.json: Language not supported
  • .vscode/micropython-dict.txt: Language not supported
  • .vscode/settings.json: Language not supported
  • cspell.json: Language not supported
  • src/stubber/board/modulelist.txt: Language not supported
  • src/stubber/board/createstubs_db_min.py: Evaluated as low risk
  • src/stubber/board/createstubs_min.py: Evaluated as low risk
  • src/stubber/board/createstubs_mem_min.py: Evaluated as low risk
  • missing_docs/_thread.pyi: Evaluated as low risk
  • src/stubber/board/createstubs.py: Evaluated as low risk
  • src/stubber/board/createstubs_db.py: Evaluated as low risk
  • src/stubber/board/createstubs_mem.py: Evaluated as low risk
  • src/mpflash/mpflash/versions.py: Evaluated as low risk
  • src/mpflash/mpflash/basicgit.py: Evaluated as low risk
  • src/stubber/codemod/visitors/typevars.py: Evaluated as low risk
Comments suppressed due to low confidence (3)

src/stubber/codemod/merge_docstub.py:229

  • Ensure updated_body is a list before modifying it in the add_missed_overloads method.
updated_body = list(updated_node.body)  # type: ignore

src/stubber/codemod/merge_docstub.py:256

  • Verify that the locate_function_by_name method correctly identifies the function by name.
def locate_function_by_name(self, overload, updated_body):

src/stubber/codemod/merge_docstub.py:285

  • Correct the spelling mistake in the comment on line 285: 'carefull' should be 'careful'.
# we need to be carefull not to copy over all the annotations if the types are different
(cherry picked from commit 0b46928)
(cherry picked from commit ef29dc9)
Copy link

codecov bot commented Jan 2, 2025

Codecov Report

Attention: Patch coverage is 79.20434% with 115 lines in your changes missing coverage. Please review.

Please upload report for BASE (EOY_mpflash@9364da8). Learn more about missing BASE report.

Files with missing lines Patch % Lines
src/stubber/codemod/enrich.py 52.38% 32 Missing and 18 partials ⚠️
src/stubber/publish/missing_class_methods.py 0.00% 16 Missing ⚠️
src/stubber/board/createstubs_mem_min.py 85.45% 5 Missing and 3 partials ⚠️
src/stubber/rst/reader.py 84.31% 5 Missing and 3 partials ⚠️
src/stubber/codemod/visitors/typevars.py 92.50% 4 Missing and 2 partials ⚠️
src/stubber/board/createstubs_db_min.py 76.19% 2 Missing and 3 partials ⚠️
src/stubber/board/createstubs_min.py 76.19% 2 Missing and 3 partials ⚠️
src/stubber/codemod/merge_docstub.py 95.00% 2 Missing and 3 partials ⚠️
src/stubber/cst_transformer.py 85.71% 3 Missing and 1 partial ⚠️
src/stubber/publish/merge_docstubs.py 57.14% 3 Missing ⚠️
... and 3 more
Additional details and impacted files
@@              Coverage Diff               @@
##             EOY_mpflash     #642   +/-   ##
==============================================
  Coverage               ?   77.87%           
==============================================
  Files                  ?       69           
  Lines                  ?     6006           
  Branches               ?      983           
==============================================
  Hits                   ?     4677           
  Misses                 ?      992           
  Partials               ?      337           
Flag Coverage Δ
stubber 77.82% <79.20%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

… 'type' in CI Windows

Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Signed-off-by: Jos Verlinde <Jos.Verlinde@microsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mpflash Flashing tool for Micropython stubber MicroPython-stubber CLI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant