Skip to content

Commit

Permalink
DM-44635: Add UP040 to ruff ignore
Browse files Browse the repository at this point in the history
[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](python/mypy#15238).
  • Loading branch information
fajpunk committed Jun 26, 2024
1 parent a12daf5 commit 64c26bf
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions project_templates/fastapi_safir_app/example/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion project_templates/technote_md/testn-000/technote.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion project_templates/technote_rst/testn-000/technote.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 64c26bf

Please sign in to comment.