-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX: fixed some plots not showing in the console
expressions like "arr[anything].plot(arg=anything)" were mistakenly considered as inplace updates
- Loading branch information
Showing
3 changed files
with
46 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,9 @@ | ||
.. py:currentmodule:: larray_editor | ||
|
||
Syntax changes | ||
^^^^^^^^^^^^^^ | ||
|
||
* renamed ``MappingEditor.old_method_name()`` to :py:obj:`MappingEditor.new_method_name()` (closes :editor_issue:`1`). | ||
|
||
* renamed ``old_argument_name`` argument of :py:obj:`MappingEditor.method_name()` to ``new_argument_name``. | ||
|
||
|
||
Backward incompatible changes | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
* other backward incompatible changes | ||
|
||
|
||
New features | ||
^^^^^^^^^^^^ | ||
|
||
* added a feature (see the :ref:`miscellaneous section <misc_editor>` for details). | ||
|
||
* added another feature in the editor (closes :editor_issue:`1`). | ||
|
||
.. note:: | ||
|
||
- It works for foo bar ! | ||
- It does not work for foo baz ! | ||
|
||
|
||
.. _misc_editor: | ||
|
||
Miscellaneous improvements | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
* improved something. | ||
|
||
|
||
Fixes | ||
^^^^^ | ||
|
||
* fixed something (closes :editor_issue:`1`). | ||
* fixed some console plots (again) because a "fix" in the partially done | ||
0.34.5 release introduced other problems. Sadly, these new problems were | ||
discovered after the release process for 0.34.5 was started, hence the | ||
partial release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
from larray_editor.editor import SUBSET_UPDATE_PATTERN | ||
|
||
|
||
def test_pattern(): | ||
assert SUBSET_UPDATE_PATTERN.match('arr1[1] = 2') | ||
assert SUBSET_UPDATE_PATTERN.match('arr1[1]= 2') | ||
assert SUBSET_UPDATE_PATTERN.match('arr1[1]=2') | ||
assert SUBSET_UPDATE_PATTERN.match("arr1['a'] = arr2") | ||
assert SUBSET_UPDATE_PATTERN.match("arr1[func(mapping['a'])] = arr2") | ||
assert SUBSET_UPDATE_PATTERN.match("arr1.i[0, 0] = arr2") | ||
assert SUBSET_UPDATE_PATTERN.match("arr1.iflat[0, 0] = arr2") | ||
assert SUBSET_UPDATE_PATTERN.match("arr1.points[0, 0] = arr2") | ||
assert SUBSET_UPDATE_PATTERN.match("arr1.ipoints[0, 0] = arr2") | ||
assert SUBSET_UPDATE_PATTERN.match("arr1[0] += arr2") | ||
assert SUBSET_UPDATE_PATTERN.match("arr1[0] -= arr2") | ||
assert SUBSET_UPDATE_PATTERN.match("arr1[0] *= arr2") | ||
assert SUBSET_UPDATE_PATTERN.match("arr1[0] /= arr2") | ||
assert SUBSET_UPDATE_PATTERN.match("arr1[0] %= arr2") | ||
assert SUBSET_UPDATE_PATTERN.match("arr1[0] //= arr2") | ||
assert SUBSET_UPDATE_PATTERN.match("arr1[0] **= arr2") | ||
assert SUBSET_UPDATE_PATTERN.match("arr1[0] &= arr2") | ||
assert SUBSET_UPDATE_PATTERN.match("arr1[0] |= arr2") | ||
assert SUBSET_UPDATE_PATTERN.match("arr1[0] ^= arr2") | ||
assert SUBSET_UPDATE_PATTERN.match("arr1[0] >>= arr2") | ||
assert SUBSET_UPDATE_PATTERN.match("arr1[0] <<= arr2") | ||
assert SUBSET_UPDATE_PATTERN.match("arr1[0]") is None | ||
assert SUBSET_UPDATE_PATTERN.match("arr1.method()") is None | ||
assert SUBSET_UPDATE_PATTERN.match("arr1[0].method()") is None | ||
assert SUBSET_UPDATE_PATTERN.match("arr1[0].method(arg=thing)") is None | ||
assert SUBSET_UPDATE_PATTERN.match("arr1[0].method(arg==thing)") is None | ||
# this test fails but I don't think it is possible to fix it with regex | ||
# assert SUBSET_UPDATE_PATTERN.match("arr1[func('[]=0')].method()") is None |