~metalune/public-inbox

A filter is not a list, but silently casts to an empty list? WTF python? v1 PROPOSED

southerntofu
southerntofu: 1
 A filter is not a list, but silently casts to an empty list? WTF python?

 1 files changed, 1 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~metalune/public-inbox/patches/24079/mbox | git am -3
Learn more about email & git
View this thread in the archives

[PATCH] A filter is not a list, but silently casts to an empty list? WTF python? Export this patch

southerntofu
---
 main.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/main.py b/main.py
index 89dae6d..0199217 100644
--- a/main.py
+++ b/main.py
@@ -176,7 +176,7 @@ def load_subscriptions(kind):
        print("No `channels.list` file to load for local subscriptions")
        subscriptions = []
    # Remove comment entries and empty lines
    return filter(lambda entry: entry != '', subscriptions)
    return list(filter(lambda entry: entry != '', subscriptions))

# Builds a unified id@server from one of those syntaxes, additionally stripping extra whitespace and ignoring `#` as comments:
#   - id@server
-- 
2.30.2