From 64c26bf817a0751dd7761863c675e7a40fd4b250 Mon Sep 17 00:00:00 2001 From: Dan Fuchs Date: Wed, 26 Jun 2024 09:18:09 -0500 Subject: [PATCH] DM-44635: Add `UP040` to ruff ignore [UP040[(https://docs.astral.sh/ruff/rules/non-pep695-type-alias/) warns on the use of `TypeAlias` instead of the new `type` keyword. But: while Python 3.12 supports the `type` keyword, mypy [doesn't yet](https://github.com/python/mypy/issues/15238). --- project_templates/fastapi_safir_app/example/pyproject.toml | 1 + .../fastapi_safir_app/{{cookiecutter.name}}/pyproject.toml | 1 + project_templates/square_pypi_package/example/pyproject.toml | 1 + .../square_pypi_package/{{cookiecutter.name}}/pyproject.toml | 1 + project_templates/technote_md/testn-000/technote.toml | 2 +- project_templates/technote_rst/testn-000/technote.toml | 2 +- 6 files changed, 6 insertions(+), 2 deletions(-) diff --git a/project_templates/fastapi_safir_app/example/pyproject.toml b/project_templates/fastapi_safir_app/example/pyproject.toml index 37404905..151017ce 100644 --- a/project_templates/fastapi_safir_app/example/pyproject.toml +++ b/project_templates/fastapi_safir_app/example/pyproject.toml @@ -140,6 +140,7 @@ ignore = [ "TID252", # if we're going to use relative imports, use them always "TRY003", # good general advice but lint is way too aggressive "TRY301", # sometimes raising exceptions inside try is the best flow + "UP040", # Python 3.12 supports `type` alias kw, but mypy doesn't yet # The following settings should be disabled when using ruff format # per https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules diff --git a/project_templates/fastapi_safir_app/{{cookiecutter.name}}/pyproject.toml b/project_templates/fastapi_safir_app/{{cookiecutter.name}}/pyproject.toml index 212dfe81..ce944ff1 100644 --- a/project_templates/fastapi_safir_app/{{cookiecutter.name}}/pyproject.toml +++ b/project_templates/fastapi_safir_app/{{cookiecutter.name}}/pyproject.toml @@ -140,6 +140,7 @@ ignore = [ "TID252", # if we're going to use relative imports, use them always "TRY003", # good general advice but lint is way too aggressive "TRY301", # sometimes raising exceptions inside try is the best flow + "UP040", # Python 3.12 supports `type` alias kw, but mypy doesn't yet # The following settings should be disabled when using ruff format # per https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules diff --git a/project_templates/square_pypi_package/example/pyproject.toml b/project_templates/square_pypi_package/example/pyproject.toml index 670c49d0..ae64141c 100644 --- a/project_templates/square_pypi_package/example/pyproject.toml +++ b/project_templates/square_pypi_package/example/pyproject.toml @@ -176,6 +176,7 @@ ignore = [ "TID252", # if we're going to use relative imports, use them always "TRY003", # good general advice but lint is way too aggressive "TRY301", # sometimes raising exceptions inside try is the best flow + "UP040", # Python 3.12 supports `type` alias kw, but mypy doesn't yet # The following settings should be disabled when using ruff format # per https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules diff --git a/project_templates/square_pypi_package/{{cookiecutter.name}}/pyproject.toml b/project_templates/square_pypi_package/{{cookiecutter.name}}/pyproject.toml index 1b26b670..0a8f0f39 100644 --- a/project_templates/square_pypi_package/{{cookiecutter.name}}/pyproject.toml +++ b/project_templates/square_pypi_package/{{cookiecutter.name}}/pyproject.toml @@ -176,6 +176,7 @@ ignore = [ "TID252", # if we're going to use relative imports, use them always "TRY003", # good general advice but lint is way too aggressive "TRY301", # sometimes raising exceptions inside try is the best flow + "UP040", # Python 3.12 supports `type` alias kw, but mypy doesn't yet # The following settings should be disabled when using ruff format # per https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules diff --git a/project_templates/technote_md/testn-000/technote.toml b/project_templates/technote_md/testn-000/technote.toml index cd5c0f4c..0c627ba1 100644 --- a/project_templates/technote_md/testn-000/technote.toml +++ b/project_templates/technote_md/testn-000/technote.toml @@ -4,7 +4,7 @@ series_id = "TESTN" canonical_url = "https://testn-000.lsst.io" github_url = "https://github.com/lsst/testn-000" github_default_branch = "main" -date_created = 2024-04-26T21:58:10Z +date_created = 2024-06-26T14:19:51Z organization.name = "Vera C. Rubin Observatory" organization.ror = "https://ror.org/048g3cy84" license.id = "CC-BY-4.0" diff --git a/project_templates/technote_rst/testn-000/technote.toml b/project_templates/technote_rst/testn-000/technote.toml index bcb31d71..169f07ae 100644 --- a/project_templates/technote_rst/testn-000/technote.toml +++ b/project_templates/technote_rst/testn-000/technote.toml @@ -4,7 +4,7 @@ series_id = "TESTN" canonical_url = "https://testn-000.lsst.io" github_url = "https://github.com/lsst/testn-000" github_default_branch = "main" -date_created = 2024-04-26T21:58:10Z +date_created = 2024-06-26T14:19:51Z organization.name = "Vera C. Rubin Observatory" organization.ror = "https://ror.org/048g3cy84" license.id = "CC-BY-4.0"