-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
py/builtinhelp: Add options for changing help('modules') format. #18734
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
base: master
Are you sure you want to change the base?
Conversation
d497453 to
936caa0
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #18734 +/- ##
=======================================
Coverage 98.41% 98.41%
=======================================
Files 171 171
Lines 22324 22324
=======================================
Hits 21971 21971
Misses 353 353 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Code size report: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a sensible change to me.
py/builtinhelp.c
Outdated
|
|
||
| #if MICROPY_PY_BUILTINS_HELP | ||
|
|
||
| #ifndef MICROPY_PY_BUILTINS_HELP_NUM_COLUMNS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would expect these defines in py/mpconfig.h. There already defines related to MICROPY_PY_BUILTINS_HELP
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these are fairly niche settings and can reasonably be located locally in the file where they are used.
But if you insist, I will certainly move them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is up to Damien to decide. My suggestion follow the setting hierarchy in MicroPython, which is usually
mpconfigboard.py
mpconfigport.py
mpconfig.py
There are slight variations of this, like an additional mpconfigmcu.py at the second level, but usually configurable options are expected in one of the config file. But, as always, nor rules without exceptions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hear you. I have moved settings.
This commit allow to change count and width of columns
for help('modules') output by mpconfigport.h.
Signed-off-by: radiofan <radiofan22@mail.ru>
936caa0 to
01ddf21
Compare
This commit allow to change count and width of columns for help('modules') output by mpconfigport.h.
Summary
Hello, MicoPython community.
We are porting MicroPython on our device. We recently ran into a problem. Width of screen of our device is so small. Default format of
help('modules')is poorly displayed. We would like to be able to change it byNUM_COLUMNSandCOLUMN_WIDTH.Testing
Tested on unix port.
Result: