plint

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

commit 98fbf69634b8ece59a773bd64d7df2985fa1b2bc
parent 82139a3b897260dbd9775801b613e3406042a2d2
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Sat, 11 Jan 2014 11:27:19 +0100

fix bug with error reporting without parse

Diffstat:
error.py | 3++-
verse.py | 1+
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/error.py b/error.py @@ -55,7 +55,8 @@ class ErrorCollection: def lines(self, short=False): l = [] - l.append([self.say(x, short) for x in self.align()]) + if self.verse.possible != None: + l.append([self.say(x, short) for x in self.align()]) for e in self.errors: l.append([self.say(e.report(self.pattern), short)]) return l diff --git a/verse.py b/verse.py @@ -80,6 +80,7 @@ class Verse: self.pattern = pattern # will be updated later, used in parse and feminine self.phon = None + self.possible = None whitespace_regexp = re.compile("(\s*)") ys_regexp = re.compile("(\s*)")