This is the v2 branch which only supports EV3. Removing the extra APIs
will prevent them from showing up when this library is used for code
completion.
Intellisense in VS Code (both jedi and ms python language server) picks
up all imported names and suggests them with equal priority for
code completion. By adding a leading underscore, intellisense lists
these with a lower priority, so they don't get in the way.
Also rename from builtins to _common while we are touching this to
better reflect the intention of the module (it contains types shared
by multiple modules, not builtin types like int).
This adds a _PybricksEnum base class for all enums. In Pybricks
MicroPython, we don't have an Enum class, but rather just simple
lookup tables.
The __repr__() method prints the enum values like the Pybricks
MicroPython implementation and also causes sphinx doc to correctly
print the value when used as a default value for aguments.
The __dir__() method is overloaded for both the instance and the class
to match what is seen in Pybricks MicroPython. This should help hide
things from code Python completion that are not present in MicroPython.