mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-12 01:24:17 +00:00
config: drop _instances for methods
This is no longer needed with the double colon reference to link to class instances.
This commit is contained in:
+1
-15
@@ -1,21 +1,7 @@
|
||||
"""Sphinx workaround to document instance attributes such as self.light"""
|
||||
|
||||
from .builtins import Motor, LightArray
|
||||
from .builtins import Motor
|
||||
from .parameters import Direction, Stop
|
||||
from types import ModuleType
|
||||
|
||||
|
||||
def make_instance(classdef):
|
||||
"""Make a class instance to look like a module so Sphinx can parse it."""
|
||||
name = ''
|
||||
mod = ModuleType(name)
|
||||
for m in classdef.__dict__.values():
|
||||
if callable(m):
|
||||
setattr(mod, m.__name__, m)
|
||||
return mod
|
||||
|
||||
|
||||
lights = make_instance(LightArray)
|
||||
|
||||
|
||||
class Motor(Motor):
|
||||
|
||||
Reference in New Issue
Block a user