From 08473a17aa984a77a38d213ab05a94bac643bc38 Mon Sep 17 00:00:00 2001 From: Zengwei Yao Date: Sun, 10 Apr 2022 23:29:28 +0800 Subject: [PATCH] Modify init (#301) * update icefall/__init__.py to import more common functions. * update icefall/__init__.py * make imports style consistent. * exclude black check for icefall/__init__.py in pyproject.toml. --- .pre-commit-config.yaml | 2 ++ icefall/__init__.py | 10 ++++++++++ pyproject.toml | 1 + 3 files changed, 13 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b59784dbf..446ba0fe7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,6 +4,8 @@ repos: hooks: - id: black args: [--line-length=80] + additional_dependencies: ['click==8.0.1'] + exclude: icefall\/__init__\.py - repo: https://github.com/PyCQA/flake8 rev: 3.9.2 diff --git a/icefall/__init__.py b/icefall/__init__.py index f466d6a62..ec77e89b5 100644 --- a/icefall/__init__.py +++ b/icefall/__init__.py @@ -1,3 +1,13 @@ +# isort:skip_file + +from . import ( + checkpoint, + decode, + dist, + env, + utils +) + from .checkpoint import ( average_checkpoints, find_checkpoints, diff --git a/pyproject.toml b/pyproject.toml index ec5623f90..b4f8c3377 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,4 +10,5 @@ exclude = ''' | \.github )/ | make_kn_lm.py + | icefall\/__init__\.py '''