From 9afae8dc689298549956a94d6fc0fb9393f49b33 Mon Sep 17 00:00:00 2001 From: SaJH Date: Sat, 28 Oct 2023 00:51:45 +0900 Subject: [PATCH] =?UTF-8?q?:bug:Fix:=20pre-commit=20=EC=84=A4=EC=A0=95=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD=20=EB=B0=8F=20import=20=EC=BB=A8=EB=B2=A4?= =?UTF-8?q?=EC=85=98=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - pre commit ymal파일이 CI에 적용된 설정 중 isort가 조금 달라서 변경하여 적용했습니다 --- .pre-commit-config.yaml | 10 +++++++--- posts/views.py | 6 +++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 41fbabe..a7574aa 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -10,19 +10,23 @@ repos: hooks: - id: black args: ['-l', '140', '-t', 'py311'] + - repo: https://github.com/myint/autoflake rev: v1.4 hooks: - id: autoflake args: - - --in-place - - --remove-unused-variables - --remove-all-unused-imports + - --remove-unused-variables + - --ignore-init-module-imports + - --in-place + - --recursive + - repo: https://github.com/pycqa/isort rev: 5.12.0 hooks: - id: isort - args: ['--line-length', '140'] + args: ['--profile', 'black', '--filter-files', 'true'] default_language_version: python: python3.11 diff --git a/posts/views.py b/posts/views.py index fce054b..194e089 100644 --- a/posts/views.py +++ b/posts/views.py @@ -18,7 +18,11 @@ from posts.filters import PostFilter from posts.models import Post from posts.paginations import PaginationHandlerMixin -from posts.serializers import PostListSerializer, StatisticsListSerializer, StatisticsQuerySerializer +from posts.serializers import ( + PostListSerializer, + StatisticsListSerializer, + StatisticsQuerySerializer, +) class StatisticsListView(APIView):