mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[robotpy] Fixup problems during stubgen (#8781)
Part of the `semiwrap` process that hasn't been ported over yet is generating pyi stubs. It is possible to not have your semiwrap setup correctly and "leak" native types into the generated python docstrings, which causes the process to [fail](https://github.com/pjreiniger/mostrobotpy/actions/runs/24618640845/job/71985311682#step:12:3652). semiwrap also has a tool you can run, 'create-imports' that will read the symbols from a build pybind library and automatically create and sort the imports in the `__init__.py` file. This step is not enforced by CI, which is why it hasn't been failing in `mostrobotpy` land. This PR fixes the stubgen problems and runs reorganizes the imports. I will have a follow up PR that can bring these automatically into the build system after this lands. I'd do a fancy new `gh stack` but I can't figure out if it works on forks.
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
extra_includes:
|
||||
- pybind11/chrono.h
|
||||
|
||||
classes:
|
||||
wpi::internal::PeriodicPriorityQueue:
|
||||
methods:
|
||||
@@ -12,6 +15,7 @@ classes:
|
||||
Clear:
|
||||
RunCallbacks:
|
||||
GetQueue:
|
||||
ignore: true
|
||||
GetLoopStartTime:
|
||||
wpi::internal::PeriodicPriorityQueue::Callback:
|
||||
attributes:
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
extra_includes:
|
||||
- pybind11/chrono.h
|
||||
|
||||
classes:
|
||||
wpi::TimedRobot:
|
||||
attributes:
|
||||
DEFAULT_PERIOD:
|
||||
m_notifier:
|
||||
ignore: true
|
||||
m_startTime:
|
||||
methods:
|
||||
StartCompetition:
|
||||
|
||||
@@ -5,6 +5,7 @@ from ._wpilib import (
|
||||
ADXL345_I2C,
|
||||
AddressableLED,
|
||||
Alert,
|
||||
Alliance,
|
||||
AnalogAccelerometer,
|
||||
AnalogEncoder,
|
||||
AnalogInput,
|
||||
@@ -42,6 +43,7 @@ from ._wpilib import (
|
||||
Koors40,
|
||||
LEDPattern,
|
||||
MatchState,
|
||||
MatchType,
|
||||
MecanumDrive,
|
||||
Mechanism2d,
|
||||
MechanismLigament2d,
|
||||
@@ -51,12 +53,15 @@ from ._wpilib import (
|
||||
MotorControllerGroup,
|
||||
MotorSafety,
|
||||
NetworkBooleanEvent,
|
||||
NiDsPS4Controller,
|
||||
NiDsPS5Controller,
|
||||
NiDsStadiaController,
|
||||
NiDsXboxController,
|
||||
Notifier,
|
||||
OnboardIMU,
|
||||
OpMode,
|
||||
OpModeRobotBase,
|
||||
NiDsPS4Controller,
|
||||
NiDsPS5Controller,
|
||||
POVDirection,
|
||||
PWM,
|
||||
PWMMotorController,
|
||||
PWMSparkFlex,
|
||||
@@ -66,6 +71,7 @@ from ._wpilib import (
|
||||
PWMVenom,
|
||||
PWMVictorSPX,
|
||||
PeriodicOpMode,
|
||||
PeriodicPriorityQueue,
|
||||
PneumaticHub,
|
||||
PneumaticsBase,
|
||||
PneumaticsControlModule,
|
||||
@@ -87,22 +93,22 @@ from ._wpilib import (
|
||||
Solenoid,
|
||||
Spark,
|
||||
SparkMini,
|
||||
NiDsStadiaController,
|
||||
SystemServer,
|
||||
Tachometer,
|
||||
Talon,
|
||||
TimedRobot,
|
||||
Timer,
|
||||
TimesliceRobot,
|
||||
TouchpadFinger,
|
||||
Tracer,
|
||||
UpDownCounter,
|
||||
VictorSP,
|
||||
Watchdog,
|
||||
NiDsXboxController,
|
||||
getCurrentThreadPriority,
|
||||
getDeployDirectory,
|
||||
getErrorMessage,
|
||||
getOperatingDirectory,
|
||||
getPOVAngle,
|
||||
getSystemTime,
|
||||
setCurrentThreadPriority,
|
||||
wait,
|
||||
@@ -112,6 +118,7 @@ __all__ = [
|
||||
"ADXL345_I2C",
|
||||
"AddressableLED",
|
||||
"Alert",
|
||||
"Alliance",
|
||||
"AnalogAccelerometer",
|
||||
"AnalogEncoder",
|
||||
"AnalogInput",
|
||||
@@ -149,6 +156,7 @@ __all__ = [
|
||||
"Koors40",
|
||||
"LEDPattern",
|
||||
"MatchState",
|
||||
"MatchType",
|
||||
"MecanumDrive",
|
||||
"Mechanism2d",
|
||||
"MechanismLigament2d",
|
||||
@@ -158,12 +166,15 @@ __all__ = [
|
||||
"MotorControllerGroup",
|
||||
"MotorSafety",
|
||||
"NetworkBooleanEvent",
|
||||
"NiDsPS4Controller",
|
||||
"NiDsPS5Controller",
|
||||
"NiDsStadiaController",
|
||||
"NiDsXboxController",
|
||||
"Notifier",
|
||||
"OnboardIMU",
|
||||
"OpMode",
|
||||
"OpModeRobotBase",
|
||||
"NiDsPS4Controller",
|
||||
"NiDsPS5Controller",
|
||||
"POVDirection",
|
||||
"PWM",
|
||||
"PWMMotorController",
|
||||
"PWMSparkFlex",
|
||||
@@ -173,6 +184,7 @@ __all__ = [
|
||||
"PWMVenom",
|
||||
"PWMVictorSPX",
|
||||
"PeriodicOpMode",
|
||||
"PeriodicPriorityQueue",
|
||||
"PneumaticHub",
|
||||
"PneumaticsBase",
|
||||
"PneumaticsControlModule",
|
||||
@@ -180,9 +192,9 @@ __all__ = [
|
||||
"PowerDistribution",
|
||||
"Preferences",
|
||||
"RobotBase",
|
||||
"RobotState",
|
||||
"RobotController",
|
||||
"RobotDriveBase",
|
||||
"RobotState",
|
||||
"RuntimeType",
|
||||
"SendableBuilderImpl",
|
||||
"SendableChooser",
|
||||
@@ -194,22 +206,22 @@ __all__ = [
|
||||
"Solenoid",
|
||||
"Spark",
|
||||
"SparkMini",
|
||||
"NiDsStadiaController",
|
||||
"SystemServer",
|
||||
"Tachometer",
|
||||
"Talon",
|
||||
"TimedRobot",
|
||||
"Timer",
|
||||
"TimesliceRobot",
|
||||
"TouchpadFinger",
|
||||
"Tracer",
|
||||
"UpDownCounter",
|
||||
"VictorSP",
|
||||
"Watchdog",
|
||||
"NiDsXboxController",
|
||||
"getCurrentThreadPriority",
|
||||
"getDeployDirectory",
|
||||
"getErrorMessage",
|
||||
"getOperatingDirectory",
|
||||
"getPOVAngle",
|
||||
"getSystemTime",
|
||||
"setCurrentThreadPriority",
|
||||
"wait",
|
||||
|
||||
@@ -30,9 +30,11 @@ from ._simulation import (
|
||||
LinearSystemSim_2_1_2,
|
||||
LinearSystemSim_2_2_1,
|
||||
LinearSystemSim_2_2_2,
|
||||
OpModeOptions,
|
||||
NiDsPS4ControllerSim,
|
||||
NiDsPS5ControllerSim,
|
||||
NiDsStadiaControllerSim,
|
||||
NiDsXboxControllerSim,
|
||||
OpModeOptions,
|
||||
PWMMotorControllerSim,
|
||||
PWMSim,
|
||||
PneumaticsBaseSim,
|
||||
@@ -44,8 +46,6 @@ from ._simulation import (
|
||||
SimDeviceSim,
|
||||
SingleJointedArmSim,
|
||||
SolenoidSim,
|
||||
NiDsStadiaControllerSim,
|
||||
NiDsXboxControllerSim,
|
||||
getProgramStarted,
|
||||
getProgramState,
|
||||
isTimingPaused,
|
||||
@@ -62,6 +62,7 @@ from ._simulation import (
|
||||
__all__ = [
|
||||
"ADXL345Sim",
|
||||
"AddressableLEDSim",
|
||||
"AlertSim",
|
||||
"AnalogEncoderSim",
|
||||
"AnalogInputSim",
|
||||
"BatterySim",
|
||||
@@ -87,9 +88,11 @@ __all__ = [
|
||||
"LinearSystemSim_2_1_2",
|
||||
"LinearSystemSim_2_2_1",
|
||||
"LinearSystemSim_2_2_2",
|
||||
"OpModeOptions",
|
||||
"NiDsPS4ControllerSim",
|
||||
"NiDsPS5ControllerSim",
|
||||
"NiDsStadiaControllerSim",
|
||||
"NiDsXboxControllerSim",
|
||||
"OpModeOptions",
|
||||
"PWMMotorControllerSim",
|
||||
"PWMSim",
|
||||
"PneumaticsBaseSim",
|
||||
@@ -101,8 +104,6 @@ __all__ = [
|
||||
"SimDeviceSim",
|
||||
"SingleJointedArmSim",
|
||||
"SolenoidSim",
|
||||
"NiDsStadiaControllerSim",
|
||||
"NiDsXboxControllerSim",
|
||||
"getProgramStarted",
|
||||
"getProgramState",
|
||||
"isTimingPaused",
|
||||
|
||||
Reference in New Issue
Block a user