Showing 1 of 1 files from the diff.

@@ -98,7 +98,7 @@
Loading
98 98
    name = param.String(default='', doc="""
99 99
        Title of the pane.""")
100 100
101 -
    parameters = param.List(default=[], doc="""
101 +
    parameters = param.List(default=[], allow_None=True, doc="""
102 102
        If set this serves as a whitelist of parameters to display on
103 103
        the supplied Parameterized object.""")
104 104
@@ -154,8 +154,13 @@
Loading
154 154
            object = object.owner
155 155
        if isinstance(object, param.parameterized.Parameters):
156 156
            object = object.cls if object.self is None else object.self
157 +
157 158
        if 'parameters' not in params and object is not None:
158 159
            params['parameters'] = [p for p in object.param if p != 'name']
160 +
            self._explicit_parameters = False
161 +
        else:
162 +
            self._explicit_parameters = object is not None
163 +
159 164
        if object and 'name' not in params:
160 165
            params['name'] = param_name(object.name)
161 166
        super(Param, self).__init__(object, **params)
@@ -216,9 +221,11 @@
Loading
216 221
        for event in sorted(events, key=lambda x: x.name):
217 222
            if event.name == 'object':
218 223
                if isinstance(event.new, param.parameterized.Parameters):
224 +
                    # Setting object will trigger this method a second time
219 225
                    self.object = event.new.cls if event.new.self is None else event.new.self
220 226
                    return
221 -
                if self.parameters:
227 +
                
228 +
                if self._explicit_parameters:
222 229
                    parameters = self.parameters
223 230
                elif event.new is None:
224 231
                    parameters = []
@@ -226,9 +233,16 @@
Loading
226 233
                    parameters = [p for p in event.new.param if p != 'name']
227 234
                    self.name = param_name(event.new.name)
228 235
            if event.name == 'parameters':
229 -
                parameters = [] if event.new == [] else event.new
236 +
                if event.new is None:
237 +
                    self._explicit_parameters = False
238 +
                    if self.object is not None:
239 +
                        parameters = [p for p in self.object.param if p != 'name']
240 +
                else:
241 +
                    self._explicit_parameters = True
242 +
                    parameters = [] if event.new == [] else event.new
230 243
231 244
        if parameters != [] and parameters != self.parameters:
245 +
            # Setting parameters will trigger this method a second time
232 246
            self.parameters = parameters
233 247
            return
234 248
Files Coverage
panel 86.08%
dodo.py 0.00%
setup.py 0.00%
Project Totals (147 files) 85.68%
6630.1
TRAVIS_PYTHON_VERSION=3.6
TRAVIS_OS_NAME=linux
6629.1
TRAVIS_PYTHON_VERSION=3.6
TRAVIS_OS_NAME=linux
1
coverage:
2
  status:
3
    project:
4
      default:
5
        target: auto
6
        threshold: 0.1
7
        base: auto
8

9
comment:
10
  require_changes: yes
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading