Commit 55249e58 authored by Dr. Felix Tobias Schindler's avatar Dr. Felix Tobias Schindler
Browse files

make linter happy and catch some bugs along the way

parent f5a48fca
Pipeline #106148 passed with stages
in 45 minutes and 48 seconds
......@@ -123,7 +123,9 @@ if config.HAVE_DUNEGDT:
def __eq__(self, other):
return type(other) is DuneXTVectorSpace \
and self.dune_vector_type == other.dune_vector_type and self.dim == other.dim and self.id == other.id
and self.dune_vector_type == other.dune_vector_type \
and self.dim == other.dim \
and self.id == other.id
# since we implement __eq__, we also need to implement __hash__
def __hash__(self):
......
......@@ -43,16 +43,16 @@ def _get_dunegdt_version():
try:
version = dune.gdt.__version__
if parse(version) < parse('2021.1.2') or parse(version) >= parse('2021.2'):
warnings.warn(f'dune-gdt bindings have been tested for version 2021.1.x (x >= 2) '
'(installed: {dune.gdt.__version__}).')
warnings.warn('dune-gdt bindings have been tested for version 2021.1.x (x >= 2) '
f'(installed: {dune.gdt.__version__}).')
except AttributeError:
warnings.warn('dune-gdt bindings have been tested for version 2021.1.x (x >= 2) '
'(installed: unknown older than 2021.1.2).')
try:
xt_version = dune.xt.__version__
if parse(xt_version) < parse('2021.1.2') or parse(xt_version) >= parse('2021.2'):
warnings.warn(f'dune-gdt bindings have been tested for dune-xt 2021.1.x (x >= 2) '
'(installed: {dune.xt.__version__}).')
warnings.warn('dune-gdt bindings have been tested for dune-xt 2021.1.x (x >= 2) '
f'(installed: {dune.xt.__version__}).')
except AttributeError:
warnings.warn('dune-gdt bindings have been tested for dune-xt version 2021.1.x (x >= 2) '
'(installed: unknown older than 2021.1.2).')
......
......@@ -504,5 +504,5 @@ if config.HAVE_DUNEGDT:
def test_dunegdt_identiy_apply_inverse():
op = make_dunegdt_identity(4)
V = op.source.ones(1)
U = op.apply_inverse(U)
U = op.apply_inverse(V)
assert (U - V).sup_norm() < 1e-14
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment