Closed eladyaniv01 closed 4 years ago
not sure what is the purpose of the return None
after the change is accepted i will update the relevant docs on the wiki
Does not solve any of the requested changes in issue #54 .
can you please be a little more constructive?
However, there's no easy mechanism for accessing the added managers.
custom managers can be accessed via knowledge.manager_dict[type(manager)]
Using type as key has the benefit of some "compile-time" checks. It prevents adding multiple instances of the same manager (probably not needed).
this seems like one of the changes requested
It's important to preserve the order of sharpy's own managers, because the order affects how they are updated.
this was also done
With the current code knowledge.manager_dict[type(manager)]
does not work. With the current code you need the instance of the manager to request the instance of manager. Which doesn't make any sense. The order of the managers is preserved with zero changes already.
knowledge.py
added attribute self.manager_dict
modified
set_managers
to account for the dict assumingMyManager
is a manager, it could be accessed like soknowledge.manager_dict[type(MyManager)]
modified ( and simplified? )
configure_managers
usage