From 7e921e11b44a80ba3c410683e8030759e6df679b Mon Sep 17 00:00:00 2001 From: Tomas R Date: Fri, 14 Apr 2023 10:46:48 +0200 Subject: [PATCH] Use --extend-ignore instead of --ignore in tests (#366) Came up in [#364](https://github.com/PyCQA/flake8-pyi/pull/364#issuecomment-1507207697) Plain `--ignore` resets the list of ignores which means that the config file is not taken into account. --- tests/del.pyi | 2 +- tests/forward_refs.pyi | 2 +- tests/forward_refs_annassign.pyi | 2 +- tests/vanilla_flake8_not_clean_forward_refs.pyi | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/del.pyi b/tests/del.pyi index 699f22de..dd616077 100644 --- a/tests/del.pyi +++ b/tests/del.pyi @@ -1,4 +1,4 @@ -# flags: --ignore=Y037 +# flags: --extend-ignore=Y037 from typing import TypeAlias, Union ManyStr: TypeAlias = list[EitherStr] diff --git a/tests/forward_refs.pyi b/tests/forward_refs.pyi index 5f74f795..e4c7b703 100644 --- a/tests/forward_refs.pyi +++ b/tests/forward_refs.pyi @@ -1,4 +1,4 @@ -# flags: --ignore=Y037 +# flags: --extend-ignore=Y037 from typing import Optional, TypeAlias, Union MaybeCStr: TypeAlias = Optional[CStr] diff --git a/tests/forward_refs_annassign.pyi b/tests/forward_refs_annassign.pyi index c8874735..ba68df1a 100644 --- a/tests/forward_refs_annassign.pyi +++ b/tests/forward_refs_annassign.pyi @@ -1,4 +1,4 @@ -# flags: --ignore=Y037 +# flags: --extend-ignore=Y037 from typing import Optional, TypeAlias, Union MaybeCStr: TypeAlias = Optional[CStr] diff --git a/tests/vanilla_flake8_not_clean_forward_refs.pyi b/tests/vanilla_flake8_not_clean_forward_refs.pyi index 29a61d2a..98ec183f 100644 --- a/tests/vanilla_flake8_not_clean_forward_refs.pyi +++ b/tests/vanilla_flake8_not_clean_forward_refs.pyi @@ -1,4 +1,4 @@ -# flags: --no-pyi-aware-file-checker --ignore=Y037 +# flags: --no-pyi-aware-file-checker --extend-ignore=Y037 from typing import TypeAlias, Union ManyStr: TypeAlias = list[EitherStr] # F821 undefined name 'EitherStr'