plint

French poetry validator (local mirror of https://gitlab.com/a3nm/plint)
git clone https://a3nm.net/git/plint/
Log | Files | Refs | README

commit cef2fd3d3e8d5419406e7fe3855efbcda484e76a
parent 5a7ef01380dbc30d7bd185312f52487d2a899eca
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Mon, 18 Feb 2013 23:25:57 +0100

Fix ridiculous error when checking genres

Thanks, Gilles Esposito-Farese

Diffstat:
template.py | 11+++++------
1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/template.py b/template.py @@ -169,12 +169,11 @@ class Template: else: x = set(['M', 'F']) self.femenv[pattern.femid] = x - else: - old = list(self.femenv[pattern.femid]) - new = v.genders(self.env[pattern.myid].phon) - self.femenv[pattern.femid] &= set(new) - if len(self.femenv[pattern.femid]) == 0: - errors.append(error.ErrorBadRhymeGenre(old, new)) + old = list(self.femenv[pattern.femid]) + new = v.genders(self.env[pattern.myid].phon) + self.femenv[pattern.femid] &= set(new) + if len(self.femenv[pattern.femid]) == 0: + errors.append(error.ErrorBadRhymeGenre(old, new)) return errors, pattern, v