From 3a21c29e2eff4378c63717f8920ca3ccbfef013c Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Sun, 3 Oct 2021 00:31:00 +0200 Subject: Lint files --- text_recognizer/data/sentence_generator.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'text_recognizer/data/sentence_generator.py') diff --git a/text_recognizer/data/sentence_generator.py b/text_recognizer/data/sentence_generator.py index afcdbe9..8567e6d 100644 --- a/text_recognizer/data/sentence_generator.py +++ b/text_recognizer/data/sentence_generator.py @@ -28,7 +28,7 @@ class SentenceGenerator: r"""Generates a word or sentences from the Brown corpus. Sample a string from the Brown corpus of length at least one word and at most - max_length, padding to max_length with the '_' characters if sentence is + max_length, padding to max_length with the '_' characters if sentence is shorter. Args: @@ -39,8 +39,11 @@ class SentenceGenerator: str: A sentence from the Brown corpus. Raises: - ValueError: If max_length was not specified at initialization and not + ValueError: If max_length was not specified at initialization and not given as an argument. + + RuntimeError: If a valid string was not generated. + """ if max_length is None: max_length = self.max_length -- cgit v1.2.3-70-g09d2