You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The default python interpreter (python) is not performing tab completion for ufl.
Steps to Reproduce
Run the default python interpreter in the terminal:
python
Then, run:
>>>importufl>>>ufl.
Then, press tab two times. Notice that tab completion does not work.
Expected behavior
Tab completion should have worked.
Error message
Nothing appears on the terminal when tapping the tab key from the keyboard.
Additional Info
Tab completion seems to work fine if the measure.py file is patched by initially checking the instance of the input object of the __eq__ method from Measure:
diff --git a/ufl/measure.py b/ufl/measure.py
index 08f1fa80..df88a0b2 100644
--- a/ufl/measure.py+++ b/ufl/measure.py@@ -316,12 +316,13 @@ class Measure(object):
def __eq__(self, other):
"""Checks if two Measures are equal."""
+ if not isinstance(other, Measure):+ return False
sorted_metadata = sorted((k, id(v)) for k, v in list(self._metadata.items()))
sorted_other_metadata = sorted((k, id(v)) for k, v in list(other._metadata.items()))
return (
- isinstance(other, Measure)- and self._integral_type == other._integral_type+ self._integral_type == other._integral_type
and self._subdomain_id == other._subdomain_id
and self._domain == other._domain
and id_or_none(self._subdomain_data) == id_or_none(other._subdomain_data)
The text was updated successfully, but these errors were encountered:
Describe the bug
The default python interpreter (
python
) is not performing tab completion forufl
.Steps to Reproduce
python
Then, press tab two times. Notice that tab completion does not work.
Expected behavior
Tab completion should have worked.
Error message
Nothing appears on the terminal when tapping the tab key from the keyboard.
Additional Info
Tab completion seems to work fine if the
measure.py
file is patched by initially checking the instance of the input object of the__eq__
method fromMeasure
:The text was updated successfully, but these errors were encountered: