Skip to content

Commit 100e7b4

Browse files
committed
Template upgrade
1 parent df6b0a8 commit 100e7b4

7 files changed

Lines changed: 50 additions & 36 deletions

File tree

‎.github/workflows/autofix.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ jobs:
2626
git diff --color --exit-code
2727
- name: Apply automatic fixes using pre-commit-ci-lite
2828
if: failure() && github.event_name == 'pull_request'
29-
uses: pre-commit-ci/lite-action@v1.0.1
29+
uses: pre-commit-ci/lite-action@5d6cc0eb514c891a40562a58a8e71576c5c7fb43 # v1.1.0

‎.github/workflows/ci.yml‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,19 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
include:
16-
- python: '^3.12'
16+
- python: '^3.13'
1717
os: ubuntu-latest
18-
- python: '3.12'
18+
- python: '3.13'
1919
os: macos-latest
20-
- python: '3.11'
20+
- python: '3.12'
2121
os: windows-latest
22-
- python: '3.10'
22+
- python: '3.11'
2323
os: ubuntu-latest
24-
- python: '3.9'
24+
- python: '3.10'
2525
os: macos-latest
26-
- python: '3.8'
26+
- python: '3.9'
2727
os: windows-latest
28-
- python: '3.8'
28+
- python: '3.9'
2929
os: ubuntu-latest
3030
versions: minimal
3131
runs-on: ${{matrix.os}}

‎.tools/copier-answers.yml‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
_commit: 0903da199
1+
_commit: 9d045b25c
22
_src_path: gh:oprypin/py-project-template
33
copyright_date: '2019'
44
mkdocs: false
5-
mkdocs_install_self: false
65
project_description: A MkDocs plugin for dynamic page redirects to prevent broken links
76
project_name: mkdocs-redirects
87
pytest: true

‎mkdocs_redirects/plugin.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Copyright 2019-2022 DataRobot, Inc. and its affiliates.
33
All rights reserved.
44
"""
5+
56
import logging
67
import os
78
import posixpath

‎pyproject.toml‎

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,20 @@ classifiers = [
1919
"License :: OSI Approved :: MIT License",
2020
"Operating System :: OS Independent",
2121
"Programming Language :: Python",
22-
"Programming Language :: Python :: 3.8",
22+
# Begin Python versions
2323
"Programming Language :: Python :: 3.9",
2424
"Programming Language :: Python :: 3.10",
2525
"Programming Language :: Python :: 3.11",
2626
"Programming Language :: Python :: 3.12",
27+
"Programming Language :: Python :: 3.13",
28+
# End Python versions
2729
"Topic :: Documentation",
2830
"Topic :: Software Development :: Documentation",
2931
"Topic :: Text Processing :: Markup :: Markdown",
3032
"Typing :: Typed",
3133
]
3234
dynamic = ["version"]
33-
requires-python = ">=3.8"
35+
requires-python = ">=3.9"
3436
dependencies = [
3537
"mkdocs >=1.1.1",
3638
#min "jinja2 >=2.10.1",
@@ -97,29 +99,37 @@ line-length = 100
9799
[tool.ruff.lint]
98100
preview = true
99101
select = [
100-
"F", "E", "W", "I", "UP", "YTT", "C4", "DTZ", "T10", "FA", "ISC", "PIE", "T20", "RSE", "TCH",
102+
"F", "E", "W", "I", "UP", "YTT", "ASYNC", "FBT", "C4", "DTZ", "T10", "FA", "ISC", "PIE", "T20", "RSE",
101103
"N803", "N804", "N805", "N806", "N807", "N815", "N816", "N999",
102-
"B002", "B003", "B005", "B007", "B008", "B009", "B010", "B011", "B012", "B013", "B014", "B015", "B016", "B017", "B018", "B020", "B021", "B022", "B023", "B025", "B026", "B029", "B030", "B031", "B032", "B033", "B034", "B035", "B905",
104+
"S201", "S202", "S303", "S304", "S305", "S306", "S506", "S602", "S604", "S605", "S612",
105+
"B002", "B003", "B004", "B005", "B007", "B008", "B009", "B010", "B011", "B012", "B013", "B014", "B015", "B016", "B017", "B018", "B019", "B020", "B021", "B022", "B023", "B025", "B026", "B029", "B030", "B031", "B032", "B033", "B034", "B035", "B039", "B905", "B909", "B911",
103106
"COM818",
104-
"G001", "G010", "G202",
107+
"LOG001", "LOG007", "LOG009", "LOG015",
108+
"G001", "G002", "G003", "G010", "G101", "G201", "G202",
109+
"PYI001", "PYI002", "PYI003", "PYI004", "PYI005", "PYI006", "PYI007", "PYI008", "PYI009", "PYI010", "PYI011", "PYI012", "PYI013", "PYI014", "PYI015", "PYI016", "PYI017", "PYI018", "PYI019", "PYI020", "PYI021", "PYI024", "PYI025", "PYI026", "PYI029", "PYI030", "PYI032", "PYI033", "PYI034", "PYI035", "PYI036", "PYI041", "PYI042", "PYI043", "PYI044", "PYI045", "PYI046", "PYI047", "PYI048", "PYI049", "PYI050", "PYI051", "PYI052", "PYI053", "PYI054", "PYI055", "PYI056", "PYI057", "PYI058", "PYI059", "PYI061", "PYI062", "PYI063", "PYI064", "PYI066",
110+
"PT001", "PT002", "PT003", "PT006", "PT007", "PT008", "PT009", "PT010", "PT013", "PT014", "PT015", "PT016", "PT018", "PT019", "PT020", "PT021", "PT022", "PT023", "PT024", "PT025", "PT026", "PT027",
105111
"Q004",
106-
"RET502", "RET504",
107-
"SIM101", "SIM103", "SIM105", "SIM107", "SIM118", "SIM201", "SIM202", "SIM208", "SIM210", "SIM211", "SIM212", "SIM220", "SIM221", "SIM222", "SIM223", "SIM300", "SIM401", "SIM910", "SIM911",
112+
"RET502", "RET503", "RET504",
113+
"SIM101", "SIM103", "SIM105", "SIM107", "SIM109", "SIM110", "SIM113", "SIM114", "SIM118", "SIM201", "SIM202", "SIM208", "SIM210", "SIM211", "SIM212", "SIM220", "SIM221", "SIM222", "SIM223", "SIM300", "SIM401", "SIM905", "SIM910", "SIM911",
114+
"TC001", "TC002", "TC003", "TC004", "TC005", "TC006", "TC007", "TC008", "TC010",
115+
"PTH201",
116+
"TD004", "TD005", "TD006", "TD007",
108117
"PGH003", "PGH004", "PGH005",
109-
"PLC0105", "PLC0131", "PLC0132", "PLC0205", "PLC0208", "PLC0414", "PLC2401", "PLC2403", "PLC2701", "PLC2801", "PLC3002",
110-
"PLE0100", "PLE0101", "PLE0116", "PLE0117", "PLE0118", "PLE0241", "PLE0302", "PLE0307", "PLE0604", "PLE0605", "PLE0704", "PLE1132", "PLE1142", "PLE1205", "PLE1206", "PLE1300", "PLE1307", "PLE1310", "PLE1507", "PLE1700", "PLE2502", "PLE2510", "PLE2512", "PLE2513", "PLE2514", "PLE2515",
111-
"PLR0124", "PLR0133", "PLR0206", "PLR0402", "PLR1701", "PLR1722", "PLR1733", "PLR1736",
112-
"PLW0108", "PLW0120", "PLW0127", "PLW0129", "PLW0131", "PLW0245", "PLW0406", "PLW0602", "PLW0603", "PLW0604", "PLW0711", "PLW1501", "PLW1508", "PLW1514", "PLW2101", "PLW3301",
113-
"TRY302", "TRY401",
118+
"PLC0105", "PLC0131", "PLC0132", "PLC0205", "PLC0206", "PLC0208", "PLC0414", "PLC2401", "PLC2403", "PLC2701", "PLC2801", "PLC3002",
119+
"PLR0124", "PLR0133", "PLR0202", "PLR0203", "PLR0206", "PLR0402", "PLR1716", "PLR1722", "PLR1733", "PLR1736", "PLR2044", "PLR6301",
120+
"TRY201", "TRY203", "TRY401",
114121
"FLY002",
115122
"PERF101", "PERF102", "PERF402", "PERF403",
116-
"FURB105", "FURB118", "FURB131", "FURB132", "FURB148", "FURB163", "FURB167", "FURB168", "FURB169",
117-
"LOG001", "LOG009",
118-
"RUF001", "RUF005", "RUF007", "RUF008", "RUF009", "RUF010", "RUF013", "RUF015", "RUF016", "RUF017", "RUF018", "RUF019", "RUF020", "RUF021", "RUF022", "RUF100", "RUF200",
123+
"FURB105", "FURB110", "FURB116", "FURB118", "FURB129", "FURB131", "FURB132", "FURB136", "FURB142", "FURB145", "FURB148", "FURB154", "FURB156", "FURB157", "FURB161", "FURB163", "FURB164", "FURB166", "FURB167", "FURB168", "FURB169", "FURB171", "FURB177", "FURB180", "FURB181", "FURB188", "FURB192",
124+
"RUF001", "RUF002", "RUF003", "RUF005", "RUF006", "RUF007", "RUF008", "RUF009", "RUF010", "RUF012", "RUF013", "RUF015", "RUF016", "RUF017", "RUF018", "RUF019", "RUF020", "RUF021", "RUF022", "RUF023", "RUF024", "RUF026", "RUF028", "RUF029", "RUF030", "RUF031", "RUF032", "RUF033", "RUF034", "RUF035", "RUF036", "RUF038", "RUF039", "RUF040", "RUF041", "RUF043", "RUF046", "RUF048", "RUF051", "RUF052", "RUF055", "RUF056", "RUF057", "RUF100", "RUF101", "RUF200",
119125
]
120-
ignore = ["E501", "E731"]
126+
ignore = ["E501", "E731", "UP038"]
127+
[tool.ruff.lint.per-file-ignores]
128+
"tests/**" = ["PLC2701", "PLR6301"]
121129
[tool.ruff.lint.flake8-comprehensions]
122130
allow-dict-calls-with-keyword-arguments = true
131+
[tool.ruff.lint.flake8-type-checking]
132+
exempt-modules = ["typing", "collections.abc"]
123133

124134
[tool.mypy]
125135
warn_unreachable = true
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#
2-
# This file is autogenerated by hatch-pip-compile with Python 3.11
2+
# This file is autogenerated by hatch-pip-compile with Python 3.12
33
#
44
# - ruff
55
#
66

7-
ruff==0.2.0
7+
ruff==0.8.6
88
# via hatch.envs.style

‎tests/test_plugin.py‎

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,16 @@ def actual_written_file(run_redirect_test):
9292

9393

9494
@pytest.mark.parametrize("use_directory_urls", [False])
95-
@pytest.mark.parametrize(["old_page", "new_page", "expected", "_"], testdata)
96-
def test_relative_redirect_no_directory_urls(actual_redirect_target, expected, _):
95+
@pytest.mark.parametrize(("old_page", "new_page", "expected", "_"), testdata)
96+
@pytest.mark.usefixtures("_")
97+
def test_relative_redirect_no_directory_urls(actual_redirect_target, expected):
9798
assert actual_redirect_target == expected
9899

99100

100101
@pytest.mark.parametrize("use_directory_urls", [True])
101-
@pytest.mark.parametrize(["old_page", "new_page", "_", "expected"], testdata)
102-
def test_relative_redirect_directory_urls(actual_redirect_target, _, expected):
102+
@pytest.mark.parametrize(("old_page", "new_page", "_", "expected"), testdata)
103+
@pytest.mark.usefixtures("_")
104+
def test_relative_redirect_directory_urls(actual_redirect_target, expected):
103105
assert actual_redirect_target == expected
104106

105107

@@ -118,13 +120,15 @@ def test_relative_redirect_directory_urls(actual_redirect_target, _, expected):
118120

119121
@pytest.mark.parametrize("use_directory_urls", [False])
120122
@pytest.mark.parametrize("new_page", ["new.md"])
121-
@pytest.mark.parametrize(["old_page", "expected", "_"], testdata)
122-
def test_page_dest_path_no_directory_urls(actual_written_file, old_page, expected, _):
123+
@pytest.mark.parametrize(("old_page", "expected", "_"), testdata)
124+
@pytest.mark.usefixtures("_")
125+
def test_page_dest_path_no_directory_urls(actual_written_file, old_page, expected):
123126
assert actual_written_file == expected
124127

125128

126129
@pytest.mark.parametrize("use_directory_urls", [True])
127130
@pytest.mark.parametrize("new_page", ["new.md"])
128-
@pytest.mark.parametrize(["old_page", "_", "expected"], testdata)
129-
def test_page_dest_path_directory_urls(actual_written_file, old_page, _, expected):
131+
@pytest.mark.parametrize(("old_page", "_", "expected"), testdata)
132+
@pytest.mark.usefixtures("_")
133+
def test_page_dest_path_directory_urls(actual_written_file, old_page, expected):
130134
assert actual_written_file == expected

0 commit comments

Comments
 (0)