From 23da8ca89848b4c022d12513e9880384f612af5f Mon Sep 17 00:00:00 2001 From: Stephan Hoyer Date: Tue, 15 Oct 2024 15:57:56 +0900 Subject: [PATCH] fix pytype error --- xarray/core/formatting.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xarray/core/formatting.py b/xarray/core/formatting.py index 9b0ab8a8ae6..91864d4581a 100644 --- a/xarray/core/formatting.py +++ b/xarray/core/formatting.py @@ -1074,9 +1074,9 @@ def diff_datatree_repr(a: DataTree, b: DataTree, compat): # If the trees structures are different there is no point comparing each node # TODO we could show any differences in nodes up to the first place that structure differs? - if treestructure_diff is not None or compat == "isomorphic": + if treestructure_diff is not None: summary.append("\n" + treestructure_diff) - else: + elif compat != "isomorphic": nodewise_diff = diff_nodewise_summary(a, b, compat) summary.append("\n" + nodewise_diff)