diff --git a/.flake8 b/.flake8 index 3f1227b9b..b8f0e4715 100644 --- a/.flake8 +++ b/.flake8 @@ -4,8 +4,9 @@ statistics=true max-line-length = 80 per-file-ignores = # line too long - egs/librispeech/ASR/conformer_ctc/conformer.py: E501, + egs/librispeech/ASR/*/conformer.py: E501, exclude = .git, - **/data/** + **/data/**, + icefall/shared/make_kn_lm.py diff --git a/egs/librispeech/ASR/conformer_mmi/train-with-attention.py b/egs/librispeech/ASR/conformer_mmi/train-with-attention.py index a3e266814..8b8994059 100755 --- a/egs/librispeech/ASR/conformer_mmi/train-with-attention.py +++ b/egs/librispeech/ASR/conformer_mmi/train-with-attention.py @@ -203,7 +203,8 @@ def get_params() -> AttributeDict: "warm_step": 80000, "use_pruned_intersect": False, "den_scale": 1.0, - "use_ali_until": 13000, # use alignments before this number of batches + # use alignments before this number of batches + "use_ali_until": 13000, } ) diff --git a/egs/librispeech/ASR/conformer_mmi/train.py b/egs/librispeech/ASR/conformer_mmi/train.py index 18cc80a9a..6580792ff 100755 --- a/egs/librispeech/ASR/conformer_mmi/train.py +++ b/egs/librispeech/ASR/conformer_mmi/train.py @@ -203,7 +203,8 @@ def get_params() -> AttributeDict: "warm_step": 80000, "use_pruned_intersect": False, "den_scale": 1.0, - "use_ali_until": 13000, # use alignments before this number of batches + # use alignments before this number of batches + "use_ali_until": 13000, } ) diff --git a/test/test_lexicon.py b/test/test_lexicon.py index 2a16db226..69867efc7 100755 --- a/test/test_lexicon.py +++ b/test/test_lexicon.py @@ -26,8 +26,8 @@ import os import shutil import sys from pathlib import Path +from typing import List -import k2 import sentencepiece as spm from icefall.lexicon import UniqLexicon