Skip to content

Commit 5bb6c1c

Browse files
Fitter: Make pylint happier
1 parent f6695ca commit 5bb6c1c

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Orange/modelling/base.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class Fitter(Learner, metaclass=FitterMeta):
3030
learners.
3131
3232
"""
33-
__fits__ = None
33+
__fits__ = {}
3434
__returns__ = Model
3535

3636
# Constants to indicate what kind of problem we're dealing with
@@ -106,10 +106,11 @@ def supports_weights(self):
106106
"""The fitter supports weights if both the classification and
107107
regression learners support weights."""
108108
return (
109-
hasattr(self.get_learner(self.CLASSIFICATION), 'supports_weights')
110-
and self.get_learner(self.CLASSIFICATION).supports_weights) and (
109+
hasattr(self.get_learner(self.CLASSIFICATION), 'supports_weights') and
110+
self.get_learner(self.CLASSIFICATION).supports_weights and
111111
hasattr(self.get_learner(self.REGRESSION), 'supports_weights')
112-
and self.get_learner(self.REGRESSION).supports_weights)
112+
and self.get_learner(self.REGRESSION).supports_weights
113+
)
113114

114115
@property
115116
def params(self):

0 commit comments

Comments
 (0)