From 62c50ca4eb4bfc84cc55e941f28007503bbb8ed9 Mon Sep 17 00:00:00 2001 From: Diana Wu <41603229+ceruulean@users.noreply.github.com> Date: Sat, 3 Sep 2022 17:55:11 -0400 Subject: [PATCH] Fix #21 --- readability/scorers/smog.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readability/scorers/smog.py b/readability/scorers/smog.py index 8d9ef0a..11637ca 100644 --- a/readability/scorers/smog.py +++ b/readability/scorers/smog.py @@ -20,7 +20,7 @@ def __init__(self, stats, sentences, all_sentences=False): If all_sentences is false, computes the score as described in McLaughlin, 1969, using exactly 30 sentences If all_sentences is true, adjusts the score to use all sentences in the text """ - if stats.num_sentences < 30: + if stats.num_sentences < 30 and not all_sentences: raise ReadabilityException( 'SMOG requires 30 sentences. {} found' .format(stats.num_sentences))