Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit 8617d16

Browse files
committed
Prevent front-end errors during test suite run.
1 parent 89a864e commit 8617d16

32 files changed

+3384
-3357
lines changed

dash_core_components/Checklist.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66

7-
schema = {'id': {'type': 'string'}, 'options': {'type': 'list', 'schema': {'type': 'dict', 'allow_unknown': False, 'nullable': False, 'schema': {'label': {'type': 'string'}, 'value': {'type': 'string'}, 'disabled': {'type': 'boolean'}}}}, 'values': {'type': 'list', 'schema': {'type': 'string', 'nullable': False}}, 'className': {'type': 'string'}, 'style': {'type': 'dict'}, 'inputStyle': {'type': 'dict'}, 'inputClassName': {'type': 'string'}, 'labelStyle': {'type': 'dict'}, 'labelClassName': {'type': 'string'}, 'fireEvent': {}, 'setProps': {}, 'dashEvents': {'allowed': ['change'], 'type': ('string', 'number')}}
7+
schema = {'id': {'type': 'string'}, 'options': {'type': 'list', 'schema': {'type': 'dict', 'allow_unknown': False, 'nullable': False, 'schema': {'label': {'type': 'string'}, 'value': {'type': 'string'}, 'disabled': {'type': 'boolean'}}}}, 'values': {'type': 'list', 'schema': {'type': 'string', 'nullable': False}, 'required': True}, 'className': {'type': 'string'}, 'style': {'type': 'dict'}, 'inputStyle': {'type': 'dict'}, 'inputClassName': {'type': 'string'}, 'labelStyle': {'type': 'dict'}, 'labelClassName': {'type': 'string'}, 'fireEvent': {}, 'setProps': {}, 'dashEvents': {'allowed': ['change'], 'type': ('string', 'number')}}
88

99
class Checklist(Component):
1010
"""A Checklist component.
@@ -16,7 +16,7 @@ class Checklist(Component):
1616
Keyword arguments:
1717
- id (string; optional)
1818
- options (list; optional): An array of options
19-
- values (list; optional): The currently selected value
19+
- values (list; required): The currently selected value
2020
- className (string; optional): The class of the container (div)
2121
- style (dict; optional): The style of the container (div)
2222
- inputStyle (dict; optional): The style of the <input> checkbox element
@@ -29,7 +29,7 @@ class Checklist(Component):
2929
Available events: 'change'"""
3030
_schema = schema
3131
@_explicitize_args
32-
def __init__(self, id=Component.UNDEFINED, options=Component.UNDEFINED, values=Component.UNDEFINED, className=Component.UNDEFINED, style=Component.UNDEFINED, inputStyle=Component.UNDEFINED, inputClassName=Component.UNDEFINED, labelStyle=Component.UNDEFINED, labelClassName=Component.UNDEFINED, **kwargs):
32+
def __init__(self, id=Component.UNDEFINED, options=Component.UNDEFINED, values=Component.REQUIRED, className=Component.UNDEFINED, style=Component.UNDEFINED, inputStyle=Component.UNDEFINED, inputClassName=Component.UNDEFINED, labelStyle=Component.UNDEFINED, labelClassName=Component.UNDEFINED, **kwargs):
3333
self._prop_names = ['id', 'options', 'values', 'className', 'style', 'inputStyle', 'inputClassName', 'labelStyle', 'labelClassName']
3434
self._type = 'Checklist'
3535
self._namespace = 'dash_core_components'
@@ -41,12 +41,13 @@ def __init__(self, id=Component.UNDEFINED, options=Component.UNDEFINED, values=C
4141
_explicit_args = kwargs.pop('_explicit_args')
4242
_locals = locals()
4343
_locals.update(kwargs) # For wildcard attrs
44-
args = {k: _locals[k] for k in _explicit_args if k != 'children'}
44+
args = {k: _locals[k] for k in _explicit_args}
4545

46-
for k in []:
46+
for k in ['values']:
4747
if k not in args:
4848
raise TypeError(
4949
'Required argument `' + k + '` was not specified.')
50+
args.pop('children', None)
5051
super(Checklist, self).__init__(**args)
5152

5253
def __repr__(self):

dash_core_components/ConfirmDialog.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66

7-
schema = {'id': {'type': 'string'}, 'message': {'type': 'string'}, 'submit_n_clicks': {'type': 'number'}, 'submit_n_clicks_timestamp': {'type': 'number'}, 'cancel_n_clicks': {'type': 'number'}, 'cancel_n_clicks_timestamp': {'type': 'number'}, 'displayed': {'type': 'boolean'}, 'key': {'type': 'string'}, 'setProps': {}}
7+
schema = {'id': {'type': 'string'}, 'message': {'type': 'string'}, 'submit_n_clicks': {'type': 'number'}, 'submit_n_clicks_timestamp': {'type': 'number'}, 'cancel_n_clicks': {'type': 'number'}, 'cancel_n_clicks_timestamp': {'type': 'number'}, 'displayed': {'anyof': [{'allowed': [None], 'type': ('string', 'number'), 'nullable': True}, {'type': 'boolean'}], 'nullable': True}, 'key': {'type': 'string'}, 'setProps': {}}
88

99
class ConfirmDialog(Component):
1010
"""A ConfirmDialog component.
@@ -20,7 +20,7 @@ class ConfirmDialog(Component):
2020
- submit_n_clicks_timestamp (number; optional): Last time the submit button was clicked.
2121
- cancel_n_clicks (number; optional): Number of times the popup was canceled.
2222
- cancel_n_clicks_timestamp (number; optional): Last time the cancel button was clicked.
23-
- displayed (boolean; optional): Set to true to send the ConfirmDialog.
23+
- displayed (a value equal to: null | boolean; optional): Set to true to send the ConfirmDialog.
2424
- key (string; optional)
2525
2626
Available events: """
@@ -38,12 +38,13 @@ def __init__(self, id=Component.UNDEFINED, message=Component.UNDEFINED, submit_n
3838
_explicit_args = kwargs.pop('_explicit_args')
3939
_locals = locals()
4040
_locals.update(kwargs) # For wildcard attrs
41-
args = {k: _locals[k] for k in _explicit_args if k != 'children'}
41+
args = {k: _locals[k] for k in _explicit_args}
4242

4343
for k in []:
4444
if k not in args:
4545
raise TypeError(
4646
'Required argument `' + k + '` was not specified.')
47+
args.pop('children', None)
4748
super(ConfirmDialog, self).__init__(**args)
4849

4950
def __repr__(self):

dash_core_components/ConfirmDialogProvider.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,13 @@ def __init__(self, children=None, id=Component.UNDEFINED, message=Component.UNDE
4444
_explicit_args = kwargs.pop('_explicit_args')
4545
_locals = locals()
4646
_locals.update(kwargs) # For wildcard attrs
47-
args = {k: _locals[k] for k in _explicit_args if k != 'children'}
47+
args = {k: _locals[k] for k in _explicit_args}
4848

4949
for k in []:
5050
if k not in args:
5151
raise TypeError(
5252
'Required argument `' + k + '` was not specified.')
53+
args.pop('children', None)
5354
super(ConfirmDialogProvider, self).__init__(children=children, **args)
5455

5556
def __repr__(self):

dash_core_components/DatePickerRange.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,13 @@ def __init__(self, id=Component.UNDEFINED, start_date=Component.UNDEFINED, end_d
9797
_explicit_args = kwargs.pop('_explicit_args')
9898
_locals = locals()
9999
_locals.update(kwargs) # For wildcard attrs
100-
args = {k: _locals[k] for k in _explicit_args if k != 'children'}
100+
args = {k: _locals[k] for k in _explicit_args}
101101

102102
for k in []:
103103
if k not in args:
104104
raise TypeError(
105105
'Required argument `' + k + '` was not specified.')
106+
args.pop('children', None)
106107
super(DatePickerRange, self).__init__(**args)
107108

108109
def __repr__(self):

dash_core_components/DatePickerSingle.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,13 @@ def __init__(self, id=Component.UNDEFINED, date=Component.UNDEFINED, min_date_al
8484
_explicit_args = kwargs.pop('_explicit_args')
8585
_locals = locals()
8686
_locals.update(kwargs) # For wildcard attrs
87-
args = {k: _locals[k] for k in _explicit_args if k != 'children'}
87+
args = {k: _locals[k] for k in _explicit_args}
8888

8989
for k in []:
9090
if k not in args:
9191
raise TypeError(
9292
'Required argument `' + k + '` was not specified.')
93+
args.pop('children', None)
9394
super(DatePickerSingle, self).__init__(**args)
9495

9596
def __repr__(self):

dash_core_components/Dropdown.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,13 @@ def __init__(self, id=Component.UNDEFINED, options=Component.UNDEFINED, value=Co
5151
_explicit_args = kwargs.pop('_explicit_args')
5252
_locals = locals()
5353
_locals.update(kwargs) # For wildcard attrs
54-
args = {k: _locals[k] for k in _explicit_args if k != 'children'}
54+
args = {k: _locals[k] for k in _explicit_args}
5555

5656
for k in []:
5757
if k not in args:
5858
raise TypeError(
5959
'Required argument `' + k + '` was not specified.')
60+
args.pop('children', None)
6061
super(Dropdown, self).__init__(**args)
6162

6263
def __repr__(self):

dash_core_components/Graph.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66

7-
schema = {'id': {'type': 'string', 'required': True}, 'clickData': {'type': 'dict'}, 'hoverData': {'type': 'dict'}, 'clear_on_unhover': {'type': 'boolean'}, 'selectedData': {'type': 'dict'}, 'relayoutData': {'type': 'dict'}, 'figure': {'validator': 'plotly_figure'}, 'style': {'type': 'dict'}, 'className': {'type': 'string'}, 'animate': {'type': 'boolean'}, 'animation_options': {'type': 'dict'}, 'config': {'type': 'dict', 'allow_unknown': False, 'nullable': False, 'schema': {'staticPlot': {'type': 'boolean'}, 'editable': {'type': 'boolean'}, 'edits': {'type': 'dict', 'allow_unknown': False, 'nullable': False, 'schema': {'annotationPosition': {'type': 'boolean'}, 'annotationTail': {'type': 'boolean'}, 'annotationText': {'type': 'boolean'}, 'axisTitleText': {'type': 'boolean'}, 'colorbarPosition': {'type': 'boolean'}, 'colorbarTitleText': {'type': 'boolean'}, 'legendPosition': {'type': 'boolean'}, 'legendText': {'type': 'boolean'}, 'shapePosition': {'type': 'boolean'}, 'titleText': {'type': 'boolean'}}}, 'autosizable': {'type': 'boolean'}, 'queueLength': {'type': 'number'}, 'fillFrame': {'type': 'boolean'}, 'frameMargins': {'type': 'number'}, 'scrollZoom': {'type': 'boolean'}, 'doubleClick': {'allowed': ['false', 'reset', 'autosize', 'reset+autosize'], 'type': ('string', 'number')}, 'showTips': {'type': 'boolean'}, 'showAxisDragHandles': {'type': 'boolean'}, 'showAxisRangeEntryBoxes': {'type': 'boolean'}, 'showLink': {'type': 'boolean'}, 'sendData': {'type': 'boolean'}, 'linkText': {'type': 'string'}, 'displayModeBar': {'allowed': ['true', 'false', 'hover'], 'type': ('string', 'number')}, 'modeBarButtonsToRemove': {'type': 'list'}, 'modeBarButtonsToAdd': {'type': 'list'}, 'modeBarButtons': {'type': ('boolean', 'number', 'string', 'dict', 'list')}, 'displaylogo': {'type': 'boolean'}, 'plotGlPixelRatio': {'type': 'number'}, 'topojsonURL': {'type': 'string'}, 'mapboxAccessToken': {'type': ('boolean', 'number', 'string', 'dict', 'list')}}}, 'dashEvents': {'allowed': ['click', 'hover', 'selected', 'relayout', 'unhover'], 'type': ('string', 'number')}, 'setProps': {}, 'fireEvent': {}}
7+
schema = {'id': {'type': 'string', 'required': True}, 'clickData': {'type': 'dict'}, 'hoverData': {'type': 'dict'}, 'clear_on_unhover': {'type': 'boolean'}, 'selectedData': {'type': 'dict'}, 'relayoutData': {'type': 'dict'}, 'figure': {'type': 'dict'}, 'style': {'type': 'dict'}, 'className': {'type': 'string'}, 'animate': {'type': 'boolean'}, 'animation_options': {'type': 'dict'}, 'config': {'type': 'dict', 'allow_unknown': False, 'nullable': False, 'schema': {'staticPlot': {'type': 'boolean'}, 'editable': {'type': 'boolean'}, 'edits': {'type': 'dict', 'allow_unknown': False, 'nullable': False, 'schema': {'annotationPosition': {'type': 'boolean'}, 'annotationTail': {'type': 'boolean'}, 'annotationText': {'type': 'boolean'}, 'axisTitleText': {'type': 'boolean'}, 'colorbarPosition': {'type': 'boolean'}, 'colorbarTitleText': {'type': 'boolean'}, 'legendPosition': {'type': 'boolean'}, 'legendText': {'type': 'boolean'}, 'shapePosition': {'type': 'boolean'}, 'titleText': {'type': 'boolean'}}}, 'autosizable': {'type': 'boolean'}, 'queueLength': {'type': 'number'}, 'fillFrame': {'type': 'boolean'}, 'frameMargins': {'type': 'number'}, 'scrollZoom': {'type': 'boolean'}, 'doubleClick': {'allowed': ['false', 'reset', 'autosize', 'reset+autosize'], 'type': ('string', 'number')}, 'showTips': {'type': 'boolean'}, 'showAxisDragHandles': {'type': 'boolean'}, 'showAxisRangeEntryBoxes': {'type': 'boolean'}, 'showLink': {'type': 'boolean'}, 'sendData': {'type': 'boolean'}, 'linkText': {'type': 'string'}, 'displayModeBar': {'allowed': ['true', 'false', 'hover'], 'type': ('string', 'number')}, 'modeBarButtonsToRemove': {'type': 'list'}, 'modeBarButtonsToAdd': {'type': 'list'}, 'modeBarButtons': {'type': ('boolean', 'number', 'string', 'dict', 'list')}, 'displaylogo': {'type': 'boolean'}, 'plotGlPixelRatio': {'type': 'number'}, 'topojsonURL': {'type': 'string'}, 'mapboxAccessToken': {'type': ('boolean', 'number', 'string', 'dict', 'list')}}}, 'dashEvents': {'allowed': ['click', 'hover', 'selected', 'relayout', 'unhover'], 'type': ('string', 'number')}, 'setProps': {}, 'fireEvent': {}}
88

99
class Graph(Component):
1010
"""A Graph component.
@@ -100,12 +100,13 @@ def __init__(self, id=Component.REQUIRED, clickData=Component.UNDEFINED, hoverDa
100100
_explicit_args = kwargs.pop('_explicit_args')
101101
_locals = locals()
102102
_locals.update(kwargs) # For wildcard attrs
103-
args = {k: _locals[k] for k in _explicit_args if k != 'children'}
103+
args = {k: _locals[k] for k in _explicit_args}
104104

105105
for k in ['id']:
106106
if k not in args:
107107
raise TypeError(
108108
'Required argument `' + k + '` was not specified.')
109+
args.pop('children', None)
109110
super(Graph, self).__init__(**args)
110111

111112
def __repr__(self):

dash_core_components/Input.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,13 @@ def __init__(self, id=Component.UNDEFINED, value=Component.UNDEFINED, style=Comp
6464
_explicit_args = kwargs.pop('_explicit_args')
6565
_locals = locals()
6666
_locals.update(kwargs) # For wildcard attrs
67-
args = {k: _locals[k] for k in _explicit_args if k != 'children'}
67+
args = {k: _locals[k] for k in _explicit_args}
6868

6969
for k in []:
7070
if k not in args:
7171
raise TypeError(
7272
'Required argument `' + k + '` was not specified.')
73+
args.pop('children', None)
7374
super(Input, self).__init__(**args)
7475

7576
def __repr__(self):

dash_core_components/Interval.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,13 @@ def __init__(self, id=Component.UNDEFINED, interval=Component.UNDEFINED, disable
3737
_explicit_args = kwargs.pop('_explicit_args')
3838
_locals = locals()
3939
_locals.update(kwargs) # For wildcard attrs
40-
args = {k: _locals[k] for k in _explicit_args if k != 'children'}
40+
args = {k: _locals[k] for k in _explicit_args}
4141

4242
for k in []:
4343
if k not in args:
4444
raise TypeError(
4545
'Required argument `' + k + '` was not specified.')
46+
args.pop('children', None)
4647
super(Interval, self).__init__(**args)
4748

4849
def __repr__(self):

dash_core_components/Link.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,13 @@ def __init__(self, children=None, href=Component.UNDEFINED, refresh=Component.UN
3333
_explicit_args = kwargs.pop('_explicit_args')
3434
_locals = locals()
3535
_locals.update(kwargs) # For wildcard attrs
36-
args = {k: _locals[k] for k in _explicit_args if k != 'children'}
36+
args = {k: _locals[k] for k in _explicit_args}
3737

3838
for k in []:
3939
if k not in args:
4040
raise TypeError(
4141
'Required argument `' + k + '` was not specified.')
42+
args.pop('children', None)
4243
super(Link, self).__init__(children=children, **args)
4344

4445
def __repr__(self):

dash_core_components/Location.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66

7-
schema = {'id': {'type': 'string', 'required': True}, 'pathname': {'type': 'string'}, 'search': {'type': 'string'}, 'hash': {'type': 'string'}, 'href': {'type': 'string'}, 'refresh': {'type': 'boolean'}, 'setProps': {}}
7+
schema = {'id': {'type': 'string', 'required': True}, 'pathname': {'anyof': [{'type': 'string'}, {'allowed': [None], 'type': ('string', 'number'), 'nullable': True}], 'nullable': True}, 'search': {'type': 'string'}, 'hash': {'type': 'string'}, 'href': {'type': 'string'}, 'refresh': {'type': 'boolean'}, 'setProps': {}}
88

99
class Location(Component):
1010
"""A Location component.
@@ -13,7 +13,7 @@ class Location(Component):
1313
1414
Keyword arguments:
1515
- id (string; required)
16-
- pathname (string; optional): pathname in window.location - e.g., "/my/full/pathname"
16+
- pathname (string | a value equal to: null; optional): pathname in window.location - e.g., "/my/full/pathname"
1717
- search (string; optional): search in window.location - e.g., "?myargument=1"
1818
- hash (string; optional): hash in window.location - e.g., "#myhash"
1919
- href (string; optional): href in window.location - e.g., "/my/full/pathname?myargument=1#myhash"
@@ -34,12 +34,13 @@ def __init__(self, id=Component.REQUIRED, pathname=Component.UNDEFINED, search=C
3434
_explicit_args = kwargs.pop('_explicit_args')
3535
_locals = locals()
3636
_locals.update(kwargs) # For wildcard attrs
37-
args = {k: _locals[k] for k in _explicit_args if k != 'children'}
37+
args = {k: _locals[k] for k in _explicit_args}
3838

3939
for k in ['id']:
4040
if k not in args:
4141
raise TypeError(
4242
'Required argument `' + k + '` was not specified.')
43+
args.pop('children', None)
4344
super(Location, self).__init__(**args)
4445

4546
def __repr__(self):

dash_core_components/Markdown.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,13 @@ def __init__(self, children=None, id=Component.UNDEFINED, className=Component.UN
3333
_explicit_args = kwargs.pop('_explicit_args')
3434
_locals = locals()
3535
_locals.update(kwargs) # For wildcard attrs
36-
args = {k: _locals[k] for k in _explicit_args if k != 'children'}
36+
args = {k: _locals[k] for k in _explicit_args}
3737

3838
for k in []:
3939
if k not in args:
4040
raise TypeError(
4141
'Required argument `' + k + '` was not specified.')
42+
args.pop('children', None)
4243
super(Markdown, self).__init__(children=children, **args)
4344

4445
def __repr__(self):

dash_core_components/RadioItems.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,13 @@ def __init__(self, id=Component.UNDEFINED, options=Component.UNDEFINED, value=Co
4141
_explicit_args = kwargs.pop('_explicit_args')
4242
_locals = locals()
4343
_locals.update(kwargs) # For wildcard attrs
44-
args = {k: _locals[k] for k in _explicit_args if k != 'children'}
44+
args = {k: _locals[k] for k in _explicit_args}
4545

4646
for k in []:
4747
if k not in args:
4848
raise TypeError(
4949
'Required argument `' + k + '` was not specified.')
50+
args.pop('children', None)
5051
super(RadioItems, self).__init__(**args)
5152

5253
def __repr__(self):

dash_core_components/RangeSlider.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,13 @@ def __init__(self, id=Component.UNDEFINED, marks=Component.UNDEFINED, value=Comp
6666
_explicit_args = kwargs.pop('_explicit_args')
6767
_locals = locals()
6868
_locals.update(kwargs) # For wildcard attrs
69-
args = {k: _locals[k] for k in _explicit_args if k != 'children'}
69+
args = {k: _locals[k] for k in _explicit_args}
7070

7171
for k in []:
7272
if k not in args:
7373
raise TypeError(
7474
'Required argument `' + k + '` was not specified.')
75+
args.pop('children', None)
7576
super(RangeSlider, self).__init__(**args)
7677

7778
def __repr__(self):

dash_core_components/Slider.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,13 @@ def __init__(self, id=Component.UNDEFINED, marks=Component.UNDEFINED, value=Comp
5656
_explicit_args = kwargs.pop('_explicit_args')
5757
_locals = locals()
5858
_locals.update(kwargs) # For wildcard attrs
59-
args = {k: _locals[k] for k in _explicit_args if k != 'children'}
59+
args = {k: _locals[k] for k in _explicit_args}
6060

6161
for k in []:
6262
if k not in args:
6363
raise TypeError(
6464
'Required argument `' + k + '` was not specified.')
65+
args.pop('children', None)
6566
super(Slider, self).__init__(**args)
6667

6768
def __repr__(self):

dash_core_components/SyntaxHighlighter.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,13 @@ def __init__(self, children=None, id=Component.UNDEFINED, language=Component.UND
4040
_explicit_args = kwargs.pop('_explicit_args')
4141
_locals = locals()
4242
_locals.update(kwargs) # For wildcard attrs
43-
args = {k: _locals[k] for k in _explicit_args if k != 'children'}
43+
args = {k: _locals[k] for k in _explicit_args}
4444

4545
for k in []:
4646
if k not in args:
4747
raise TypeError(
4848
'Required argument `' + k + '` was not specified.')
49+
args.pop('children', None)
4950
super(SyntaxHighlighter, self).__init__(children=children, **args)
5051

5152
def __repr__(self):

0 commit comments

Comments
 (0)