diff --git a/Allura/allura/lib/markdown_extensions.py b/Allura/allura/lib/markdown_extensions.py index 9bcc7f892..b6d423d58 100644 --- a/Allura/allura/lib/markdown_extensions.py +++ b/Allura/allura/lib/markdown_extensions.py @@ -15,6 +15,7 @@ # specific language governing permissions and limitations # under the License. +from __future__ import annotations import re import logging from typing import List diff --git a/Allura/allura/lib/plugin.py b/Allura/allura/lib/plugin.py index 3bb389d15..03b6d61f2 100644 --- a/Allura/allura/lib/plugin.py +++ b/Allura/allura/lib/plugin.py @@ -18,6 +18,7 @@ ''' Allura plugins for authentication and project registration ''' +from __future__ import annotations import re import os import logging diff --git a/Allura/allura/lib/widgets/discuss.py b/Allura/allura/lib/widgets/discuss.py index db5cf0ac4..feef86db8 100644 --- a/Allura/allura/lib/widgets/discuss.py +++ b/Allura/allura/lib/widgets/discuss.py @@ -14,6 +14,7 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. +from __future__ import annotations from formencode import validators as fev diff --git a/ruff.toml b/ruff.toml index e1cf41377..b2e7c55cb 100644 --- a/ruff.toml +++ b/ruff.toml @@ -31,6 +31,7 @@ select = [ "PGH", # https://github.com/pre-commit/pygrep-hooks "T10", # debugger breakpoints "T20", # print() + "FA", # future annotations (to ensure compatibility with `target-version`) ] ignore = [