From c2ca7230bd830837b9a1f2fb7fe32b9d32f989c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1s=20NAVARRETE=20GUTI=C3=89RREZ?= Date: Tue, 17 Sep 2024 14:06:20 +0200 Subject: [PATCH] fix: listing methods when empty projo --- CHANGES.md | 4 ++++ bw2ui/__init__.py | 2 +- bw2ui/bin/bw2_browser.py | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 69d7867..b3a2180 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # ui Changelog +## [0.42.0] + ++ Fix method listing when project is empty + ## [0.41.0] + fix #51: show cfs for namespaced methods diff --git a/bw2ui/__init__.py b/bw2ui/__init__.py index 287a745..f5f53f1 100644 --- a/bw2ui/__init__.py +++ b/bw2ui/__init__.py @@ -5,4 +5,4 @@ # Add functions and variables you want exposed in `bw2ui.` namespace here ) -__version__ = "0.41.0" +__version__ = "0.42.0" diff --git a/bw2ui/bin/bw2_browser.py b/bw2ui/bin/bw2_browser.py index f011eff..88e3463 100644 --- a/bw2ui/bin/bw2_browser.py +++ b/bw2ui/bin/bw2_browser.py @@ -658,7 +658,7 @@ def list_methods(self): for m in methods_: m_names.add(m[0]) m_names = sorted(m_names) - if has_namespaced_methods(): + if len(methods_) > 0 and has_namespaced_methods(): self.set_current_options( { "type": "method_namespaces",