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:
Laurens Valk
2020-01-14 17:47:47 +01:00
parent 02d64775af
commit 6875e6ff42
+1 -15
View File
@@ -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):