Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Josverl
Copy link
Contributor

@Josverl Josverl commented Nov 13, 2025

This PR combines a few rather minor fixes of typos in documentation and scripts.

  • Update the aioble example to use the correct advertising interval constant name.
  • Correct the README to reference the appropriate public address constant.
  • Fix a typo in the deepcopy function to reference the correct dispatch table.

Fixes #1055, #699, #952

This is a working alternative to PR micropython#919
closes: micropython#919

Signed-off-by: Jos Verlinde <[email protected]>
Copy link
Member

@dpgeorge dpgeorge left a comment

Choose a reason for hiding this comment

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

Thanks for this, there are some good fixes here.

I approve all commits except the RST formatting one.

1. End of file on input is processed as the command 'EOF'.
2. A command is parsed out of each line by collecting the prefix composed
2. A command is parsed out of each line by collecting the prefix composed
Copy link
Member

Choose a reason for hiding this comment

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

I don't think it should add a space at the end of the line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

agree

----------------------------------------------------------------------------
This is a copy of python's Cmd, but leaves out features that aren't relevant
or can't currently be implemented for MicroPython.
.. caution::
Copy link
Member

Choose a reason for hiding this comment

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

I really don't think we should be using RST formatting here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

.Rst dropped

heapify(x) # transforms list into a heap, in-place, in linear time
item = heapreplace(heap, item) # pops and returns smallest item, and adds
# new item; the heap size is unchanged
heap = [] # creates an empty heap
Copy link
Member

Choose a reason for hiding this comment

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

Why not 4 space indent like the other example code reformatted in this PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks, missed that

@Josverl
Copy link
Contributor Author

Josverl commented Nov 14, 2025

The rst formatting was a side effect of the work I started with @jimmo to see if/how it would be possible to generate documentation pages from the source files.
Some of the existing docstrings were half-and-half RST and plaintext with a bit of .MD as well.

I have reverted the RST formatting to plaintext.

For a separate PR:
Using Sphinx-AutoAPI it should be rather simple to add documentation for the 3 categories of modules (micropython - stdlib - community) to the existing documentation. IMO That would close a discoverability and documentation gap.
Sphinx + Auto-API should be able to handle a mix of RST and MarkDown formats by enablingMyST as well.

Bumped patch level in manifest for each changed module

Signed-off-by: Jos Verlinde <[email protected]>
@@ -1,2 +1,2 @@
metadata(description="BOSCH BMI270 IMU driver.", version="1.0.0")
metadata(description="BOSCH BMI270 IMU driver.", version="1.0.1")
Copy link
Member

Choose a reason for hiding this comment

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

For code that just has a change to the comments, I don't think we should update the version number. It uses up a small amount of storage to store each version, and the compiled .mpy files anyway are not changed.

import time
from lsm6dsox import LSM6DSOX
import time
Copy link
Member

Choose a reason for hiding this comment

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

Should this be 4-space indent to match others?

@@ -1,5 +1,7 @@
# DS18x20 temperature sensor driver for MicroPython.
# MIT license; Copyright (c) 2016 Damien P. George
"""DS18x20 temperature sensor driver for MicroPython.
Copy link
Member

Choose a reason for hiding this comment

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

Suggest putting the first line of this doc string on a separate line, to match similar changes made by this PR.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Example should say "..._US".

2 participants