Skip to content

Deep magic underscore error messages rebase #2843

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

Merged
merged 26 commits into from
Nov 16, 2020
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
2209b2d
Better magic underscore errors
nicholas-esterer Oct 19, 2020
afd5b7a
Remove whitespace-only changes
nicholas-esterer Oct 20, 2020
b894b89
Assert that errors are raised
nicholas-esterer Oct 20, 2020
4c659db
Also state when a property doesn't support subscripting
nicholas-esterer Oct 20, 2020
2bf2526
Tests for non-subscriptable property errors
nicholas-esterer Oct 20, 2020
5695969
updated changelog
nicholas-esterer Oct 20, 2020
22b3e03
Improved error message when subscripting types that don't support it
nicholas-esterer Oct 23, 2020
c09c03e
Removed garbage line from test_dict_path_errors.py
nicholas-esterer Oct 23, 2020
f4be2b1
Changed PlotlyKeyError's superclass to KeyError
nicholas-esterer Nov 4, 2020
73051a6
BasePlotlyType._raise_on_invalid_property_error raises PlotlyKeyError
nicholas-esterer Nov 4, 2020
651b712
Cast some errors to PlotlyKeyError
nicholas-esterer Nov 4, 2020
9bb2470
Updated the tests to reflect the new Exception behaviour
nicholas-esterer Nov 4, 2020
bf4cd97
BasePlotlyType.__setitem__ exceptions casted to ValueError
nicholas-esterer Nov 5, 2020
7d42ffe
Merge master's whitespace changes
nicholas-esterer Nov 5, 2020
a18b341
Merge branch 'master' into deep-magic-underscore-error-msg-rebase
nicholas-esterer Nov 5, 2020
4bda7b2
Now subscripting errors triggered on types throwing TypeError
nicholas-esterer Nov 5, 2020
9e1b667
subscripting error tests compatible with Python2
nicholas-esterer Nov 5, 2020
d6aee64
Changed dict path error display to always ^
nicholas-esterer Nov 9, 2020
c6e5b4d
Try taking length of string-like objects
nicholas-esterer Nov 9, 2020
82f9bb1
leading, trailing, multiple underscores detected in dict path strings
nicholas-esterer Nov 9, 2020
70f18ca
Added tests for leading, trailing and embedded extra underscore errors
nicholas-esterer Nov 10, 2020
00851fa
Complain about trailing underscores, find closest key
nicholas-esterer Nov 10, 2020
d2bc400
Updated error messages for trailing underscores and find closest key
nicholas-esterer Nov 10, 2020
20518c1
Key guessing before and after list of valid properties
nicholas-esterer Nov 10, 2020
4066ae2
Test single property key guessing
nicholas-esterer Nov 11, 2020
86f4217
Merge branch 'master' into deep-magic-underscore-error-msg-rebase
nicholas-esterer Nov 11, 2020
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
2 changes: 1 addition & 1 deletion packages/python/plotly/plotly/basedatatypes.py
Original file line number Diff line number Diff line change
@@ -4193,7 +4193,7 @@ def __setitem__(self, prop, value):
# ----------------------
# e.g. ('foo', 1), ()
else:
err = _check_path_in_prop_tree(self, orig_prop)
err = _check_path_in_prop_tree(self, orig_prop, error_cast=ValueError)
if err is not None:
raise err
res = self