From 6875e6ff42cab0b115a24b3324ef5c6f1f269535 Mon Sep 17 00:00:00 2001 From: Laurens Valk Date: Tue, 14 Jan 2020 17:47:47 +0100 Subject: [PATCH] config: drop _instances for methods This is no longer needed with the double colon reference to link to class instances. --- pybricks/_instances.py | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/pybricks/_instances.py b/pybricks/_instances.py index a27563c..37c233b 100644 --- a/pybricks/_instances.py +++ b/pybricks/_instances.py @@ -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):