Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typo in exception names #522

Merged
merged 3 commits into from
Jan 7, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions dash/dash.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions dash/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
14 changes: 7 additions & 7 deletions tests/test_react.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')]
Expand All @@ -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')]
Expand All @@ -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')]
Expand All @@ -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')]
Expand Down Expand Up @@ -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')]
Expand Down