From 8e3d32f24c271f9730df7f736eea478332f676cc Mon Sep 17 00:00:00 2001 From: pictuga Date: Wed, 18 Mar 2020 16:22:03 +0100 Subject: [PATCH] feds: rename 'ruleset' into 'default_ruleset' Better reflects its use --- morss/feeds.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/morss/feeds.py b/morss/feeds.py index 8d2eff8..3020f9e 100644 --- a/morss/feeds.py +++ b/morss/feeds.py @@ -62,7 +62,7 @@ def parse_rules(filename=None): class ParserBase(object): def __init__(self, data=None, rules=None, parent=None): if rules is None: - rules = parse_rules()[self.ruleset] # FIXME + rules = parse_rules()[self.default_ruleset] # FIXME self.rules = rules @@ -220,7 +220,7 @@ class ParserBase(object): class ParserXML(ParserBase): - ruleset = 'rss' + default_ruleset = 'rss-channel' mimetype = ['text/xml', 'application/xml', 'application/rss+xml', 'application/rdf+xml', 'application/atom+xml', 'application/xhtml+xml'] @@ -378,7 +378,7 @@ def parse_time(value): class ParserJSON(ParserBase): - ruleset = 'json' + default_ruleset = 'json' mimetype = ['application/json', 'application/javascript', 'text/javascript'] def parse(self, raw):