HHousen / lecture2notes

Re-defined variable from outer scope PYL-W0621
Anti-pattern
Major
3 years ago4 years old
Redefining name 'cluster' from outer scope (line 385)
 611            else initialize_abstractive_model("facebook/bart-large-xsum")
 612        )
 613
 614    for idx, cluster in tqdm( 615        enumerate(sentence_clusters),
 616        desc="Summarizing Clusters",
 617        total=len(sentence_clusters),
Redefining name 'json' from outer scope (line 3)
459
460
461def metadata_to_list(candidate_transcript):
462    json = metadata_to_json(candidate_transcript)463    return json["tokens"]
464
465
Redefining name 'prev_line_num' from outer scope (line 18)
177        word = image[y : y + h, x : x + w]
178        return stroke_width(word)
179
180    prev_line_num = 0181
182    def add_line_info(row):
183        """
Redefining name 'stroke_width' from outer scope (line 22)
197        #  0: normal text
198        #  1: subtitle/bold
199        #  2: title text
200        stroke_width = row["stroke_width"]201        height = row["height"]
202        if stroke_width > avg_stroke_width * (1 + gamma) or height > avg_height * (
203            1 + beta
Redefining name 'ARGS' from outer scope (line 272)
167                    ring_buffer.clear()
168
169
170def main(ARGS):171    # Load DeepSpeech model
172    if os.path.isdir(ARGS.model):
173        model_dir = ARGS.model