From cc4df7a09c07a51004767ace27437937340a181b Mon Sep 17 00:00:00 2001 From: Pongsakorn U-chupala Date: Fri, 29 Mar 2024 07:54:33 +0000 Subject: [PATCH] Add `flake8_ignore` option --- pysen/factory.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pysen/factory.py b/pysen/factory.py index 6f11a39..53f27b7 100644 --- a/pysen/factory.py +++ b/pysen/factory.py @@ -58,6 +58,7 @@ class ConfigureLintOptions: mypy_path: Optional[List[pathlib.Path]] = None mypy_plugins: Optional[List[MypyPlugin]] = None mypy_targets: Optional[List[MypyTarget]] = None + flake8_ignore: Optional[List[str]] = None def configure_lint(options: ConfigureLintOptions) -> List[ComponentBase]: @@ -98,6 +99,8 @@ def configure_lint(options: ConfigureLintOptions) -> List[ComponentBase]: if options.enable_flake8: flake8_setting = Flake8Setting.default() + if options.flake8_ignore: + flake8_setting.ignore = options.flake8_ignore flake8_setting.max_line_length = line_length if options.enable_black: flake8_setting = flake8_setting.to_black_compatible()