From 18355b1d2243e72d3f73408a5b0b76ec2b92fb85 Mon Sep 17 00:00:00 2001 From: alexcjohnson Date: Wed, 2 Jan 2019 18:39:23 -0500 Subject: [PATCH 1/2] typo in exception names --- dash/dash.py | 6 +++--- dash/exceptions.py | 6 +++--- tests/test_react.py | 14 +++++++------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/dash/dash.py b/dash/dash.py index 5133b32adc..ecee5f08d6 100644 --- a/dash/dash.py +++ b/dash/dash.py @@ -664,7 +664,7 @@ def _validate_callback(self, output, inputs, state, events): 'supress_callback_exceptions') and arg.component_id not in layout and arg.component_id != getattr(layout, 'id', None)): - raise exceptions.NonExistantIdException(''' + raise exceptions.NonExistentIdException(''' Attempting to assign a callback to the component with the id "{}" but no components with id "{}" exist in the @@ -697,7 +697,7 @@ def _validate_callback(self, output, inputs, state, events): component.available_properties and not any(arg.component_property.startswith(w) for w in component.available_wildcard_properties)): - raise exceptions.NonExistantPropException(''' + raise exceptions.NonExistentPropException(''' Attempting to assign a callback with the property "{}" but the component "{}" doesn't have "{}" as a property.\n @@ -714,7 +714,7 @@ def _validate_callback(self, output, inputs, state, events): if (hasattr(arg, 'component_event') and arg.component_event not in component.available_events): - raise exceptions.NonExistantEventException(''' + raise exceptions.NonExistentEventException(''' Attempting to assign a callback with the event "{}" but the component "{}" doesn't have "{}" as an event.\n diff --git a/dash/exceptions.py b/dash/exceptions.py index 5d90704a0e..13b4feb044 100644 --- a/dash/exceptions.py +++ b/dash/exceptions.py @@ -10,15 +10,15 @@ class CallbackException(DashException): pass -class NonExistantIdException(CallbackException): +class NonExistentIdException(CallbackException): pass -class NonExistantPropException(CallbackException): +class NonExistentPropException(CallbackException): pass -class NonExistantEventException(CallbackException): +class NonExistentEventException(CallbackException): pass diff --git a/tests/test_react.py b/tests/test_react.py index e14c62e233..28cc3e9dfe 100644 --- a/tests/test_react.py +++ b/tests/test_react.py @@ -381,7 +381,7 @@ def test_exception_id_not_in_layout(self): app = dash.Dash('') app.layout = Div('', id='test') self.assertRaises( - exceptions.NonExistantIdException, + exceptions.NonExistentIdException, app.callback, Output('output', 'children'), [Input('input', 'value')] @@ -395,21 +395,21 @@ def test_exception_prop_not_in_component(self): ], id='body') self.assertRaises( - exceptions.NonExistantPropException, + exceptions.NonExistentPropException, app.callback, Output('output', 'non-there'), [Input('input', 'value')] ) self.assertRaises( - exceptions.NonExistantPropException, + exceptions.NonExistentPropException, app.callback, Output('output', 'children'), [Input('input', 'valuez')] ) self.assertRaises( - exceptions.NonExistantPropException, + exceptions.NonExistentPropException, app.callback, Output('body', 'childrenz'), [Input('input', 'value')] @@ -426,7 +426,7 @@ def test_exception_event_not_in_component(self): for id in ['output', 'body']: self.assertRaises( - exceptions.NonExistantEventException, + exceptions.NonExistentEventException, app.callback, Output(id, 'children'), events=[Event(id, 'style')] @@ -437,7 +437,7 @@ def test_exception_event_not_in_component(self): ) self.assertRaises( - exceptions.NonExistantEventException, + exceptions.NonExistentEventException, app.callback, Output('output', 'children'), events=[Event('graph', 'zoom')] @@ -474,7 +474,7 @@ def test_suppress_callback_exception(self): Div(id='output') ], id='body') self.assertRaises( - exceptions.NonExistantIdException, + exceptions.NonExistentIdException, app.callback, Output('id-not-there', 'children'), [Input('input', 'value')] From 8eae47244625fc4e539bc6130555de88e5b4f520 Mon Sep 17 00:00:00 2001 From: alexcjohnson Date: Mon, 7 Jan 2019 16:28:56 -0500 Subject: [PATCH 2/2] update changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3114d8e1f4..09352fc369 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## Unreleased - 2019-01-07 +## Fixed +- Fix typo in some exception names [#522](https://github.com/plotly/dash/pull/522) + ## 0.35.0 - 2018-12-18 ## Added - Experimental `--r-prefix` option to `dash-generate-components`, optionally generates R version of components and corresponding R package. [#483](https://github.com/plotly/dash/pull/483)