mirror of https://github.com/nucypher/nucypher.git
Passing Ursula class through instead of importing.
parent
0c962902e6
commit
92a7be805a
|
@ -74,6 +74,7 @@ class Character(Learner):
|
||||||
|
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
domains: Set = None,
|
domains: Set = None,
|
||||||
|
node_class: object = None,
|
||||||
is_me: bool = True,
|
is_me: bool = True,
|
||||||
federated_only: bool = False,
|
federated_only: bool = False,
|
||||||
checksum_address: str = NO_BLOCKCHAIN_CONNECTION.bool_value(False),
|
checksum_address: str = NO_BLOCKCHAIN_CONNECTION.bool_value(False),
|
||||||
|
@ -189,6 +190,7 @@ class Character(Learner):
|
||||||
Learner.__init__(self,
|
Learner.__init__(self,
|
||||||
domains=domains,
|
domains=domains,
|
||||||
network_middleware=self.network_middleware,
|
network_middleware=self.network_middleware,
|
||||||
|
node_class=node_class,
|
||||||
*args, **kwargs)
|
*args, **kwargs)
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -119,6 +119,7 @@ class Alice(Character, BlockchainPolicyAuthor):
|
||||||
self.n = STRANGER_ALICE
|
self.n = STRANGER_ALICE
|
||||||
|
|
||||||
Character.__init__(self,
|
Character.__init__(self,
|
||||||
|
node_class=Ursula,
|
||||||
is_me=is_me,
|
is_me=is_me,
|
||||||
federated_only=federated_only,
|
federated_only=federated_only,
|
||||||
checksum_address=checksum_address,
|
checksum_address=checksum_address,
|
||||||
|
@ -831,6 +832,7 @@ class Ursula(Teacher, Character, Worker):
|
||||||
abort_on_learning_error=abort_on_learning_error,
|
abort_on_learning_error=abort_on_learning_error,
|
||||||
known_nodes=known_nodes,
|
known_nodes=known_nodes,
|
||||||
domains=domains,
|
domains=domains,
|
||||||
|
node_class=Ursula,
|
||||||
**character_kwargs)
|
**character_kwargs)
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
|
@ -307,6 +307,7 @@ class Learner:
|
||||||
|
|
||||||
def __init__(self,
|
def __init__(self,
|
||||||
domains: set,
|
domains: set,
|
||||||
|
node_class: object = None,
|
||||||
network_middleware: RestMiddleware = __DEFAULT_MIDDLEWARE_CLASS(),
|
network_middleware: RestMiddleware = __DEFAULT_MIDDLEWARE_CLASS(),
|
||||||
start_learning_now: bool = False,
|
start_learning_now: bool = False,
|
||||||
learn_on_same_thread: bool = False,
|
learn_on_same_thread: bool = False,
|
||||||
|
@ -320,6 +321,7 @@ class Learner:
|
||||||
|
|
||||||
self.log = Logger("learning-loop") # type: Logger
|
self.log = Logger("learning-loop") # type: Logger
|
||||||
|
|
||||||
|
self.node_class = node_class or Teacher
|
||||||
self.learning_domains = domains
|
self.learning_domains = domains
|
||||||
self.network_middleware = network_middleware
|
self.network_middleware = network_middleware
|
||||||
self.save_metadata = save_metadata
|
self.save_metadata = save_metadata
|
||||||
|
|
Loading…
Reference in New Issue