From 4121e58fcc83082e2f5819f0232853a0c5a10c13 Mon Sep 17 00:00:00 2001 From: whcao <41630003+HIT-cwh@users.noreply.github.com> Date: Thu, 10 Feb 2022 10:02:02 +0800 Subject: [PATCH] Upgrade isort in pre-commit hook (#70) --- .pre-commit-config.yaml | 8 ++------ setup.cfg | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 19e9f8d4..b2d5118f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,12 +4,8 @@ repos: rev: 3.8.3 hooks: - id: flake8 - - repo: https://github.com/asottile/seed-isort-config - rev: v2.2.0 - hooks: - - id: seed-isort-config - - repo: https://github.com/timothycrosley/isort - rev: 4.3.21 + - repo: https://github.com/PyCQA/isort + rev: 5.10.1 hooks: - id: isort - repo: https://github.com/pre-commit/mirrors-yapf diff --git a/setup.cfg b/setup.cfg index 3349b9f7..f3eceac2 100644 --- a/setup.cfg +++ b/setup.cfg @@ -12,7 +12,7 @@ split_before_expression_after_opening_paren = true [isort] line_length = 79 multi_line_output = 0 -known_standard_library = pkg_resources,setuptools +extra_standard_library = pkg_resources,setuptools known_first_party = mmrazor known_third_party=cv2,mmcls,mmcv,mmdet,mmseg,numpy,ordered_set,packaging,pytest,pytorch_sphinx_theme,torch,yaml no_lines_before = STDLIB,LOCALFOLDER