-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix missing packages in stm32 pyproject.toml
Signed-off-by: Jos Verlinde <jos_verlinde@hotmail.com>
- Loading branch information
Showing
3 changed files
with
93 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# allows for type checking of additional builtins by pyright | ||
|
||
from typing import Tuple, TypeVar | ||
|
||
Const_T = TypeVar("Const_T", int, float, str, bytes, Tuple) # constant | ||
|
||
def const(expr: Const_T) -> Const_T: | ||
""" | ||
Used to declare that the expression is a constant so that the compiler can | ||
optimise it. The use of this function should be as follows:: | ||
from micropython import const | ||
CONST_X = const(123) | ||
CONST_Y = const(2 * CONST_X + 1) | ||
Constants declared this way are still accessible as global variables from | ||
outside the module they are declared in. On the other hand, if a constant | ||
begins with an underscore then it is hidden, it is not available as a global | ||
variable, and does not take up any memory during execution. | ||
This `const` function is recognised directly by the MicroPython parser and is | ||
provided as part of the :mod:`micropython` module mainly so that scripts can be | ||
written which run under both CPython and MicroPython, by following the above | ||
pattern. | ||
""" | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters