Skip to content

Commit 250d207

Browse files
[pre-commit.ci] pre-commit autoupdate (#19)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: S. Co1 <[email protected]>
1 parent ddd293c commit 250d207

File tree

8 files changed

+721
-521
lines changed

8 files changed

+721
-521
lines changed

.flake8

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,7 @@
11
[flake8]
2-
max-line-length=100
3-
import-order-style=pycharm
4-
application-import-names=matplotlib_window,tests
52
extend-ignore=
6-
# pycodestyle
7-
E226,
3+
E,F,W,
84
# flake8-annotations
95
ANN002,ANN003,ANN101,ANN102,ANN204,ANN206,
106
extend-exclude=
117
.venv,
12-
per-file-ignores =
13-
tests/test_*.py:E501,

.github/workflows/lint_test.yml

Lines changed: 29 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,20 @@ jobs:
1313
runs-on: ubuntu-latest
1414

1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v5
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v6
20+
with:
21+
python-version-file: "pyproject.toml"
1722

1823
- name: Install uv
19-
uses: astral-sh/setup-uv@v5
24+
uses: astral-sh/setup-uv@v7
2025
with:
21-
version: "0.6.x"
26+
version: "0.9.x"
2227
enable-cache: true
2328
cache-dependency-glob: "uv.lock"
2429

25-
- name: Set up Python
26-
uses: actions/setup-python@v5
27-
with:
28-
python-version-file: "pyproject.toml"
29-
3030
- name: Install dependencies
3131
run: uv sync --all-extras --dev
3232

@@ -38,21 +38,19 @@ jobs:
3838
runs-on: ubuntu-latest
3939
strategy:
4040
matrix:
41-
python-version: ["3.11", "3.12", "3.13"]
41+
python-version: ["3.11", "3.12", "3.13", "3.14"]
4242
fail-fast: false
4343

4444
steps:
45-
- uses: actions/checkout@v4
45+
- uses: actions/checkout@v5
4646

47-
- name: Install uv
48-
uses: astral-sh/setup-uv@v5
49-
with:
50-
version: "0.6.x"
51-
enable-cache: true
52-
cache-dependency-glob: "uv.lock"
47+
- name: Get Non-Hyphenated Python Version
48+
id: get-pyver
49+
run: |
50+
echo "PYVER=$(cut -d '-' -f 1 <<< ${{ matrix.python-version }})" >> $GITHUB_OUTPUT
5351
5452
- name: Set up (release) Python ${{ matrix.python-version }}
55-
uses: actions/setup-python@v5
53+
uses: actions/setup-python@v6
5654
if: "!endsWith(matrix.python-version, '-dev')"
5755
with:
5856
python-version: ${{ matrix.python-version }}
@@ -62,15 +60,22 @@ jobs:
6260
if: endsWith(matrix.python-version, '-dev')
6361
with:
6462
python-version: ${{ matrix.python-version }}
65-
tk: true
63+
64+
- name: Install uv
65+
uses: astral-sh/setup-uv@v7
66+
with:
67+
version: "0.9.x"
68+
enable-cache: true
69+
cache-dependency-glob: "uv.lock"
6670

6771
- name: Install dependencies
6872
run: |
69-
uv venv
70-
uv pip install tox-gh-actions tox-uv
73+
uv venv --python ${{ steps.get-pyver.outputs.PYVER }}
74+
uv pip install tox-uv
7175
7276
- name: Run tests w/tox
73-
run: uv run tox
77+
run: |
78+
uv run tox -e ${{ steps.get-pyver.outputs.PYVER }}
7479
7580
- name: Cache coverage for ${{ matrix.python-version }}
7681
uses: actions/upload-artifact@v4
@@ -85,15 +90,15 @@ jobs:
8590
needs: test
8691

8792
steps:
88-
- uses: actions/checkout@v4
93+
- uses: actions/checkout@v5
8994

9095
- name: Set up Python
91-
uses: actions/setup-python@v5
96+
uses: actions/setup-python@v6
9297
with:
9398
python-version-file: "pyproject.toml"
9499

95100
- name: Pull coverage workflow artifacts
96-
uses: actions/download-artifact@v4
101+
uses: actions/download-artifact@v5
97102
with:
98103
path: cov_cache/
99104

.github/workflows/pypi_release.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,25 +16,25 @@ jobs:
1616
id-token: write
1717

1818
steps:
19-
- uses: actions/checkout@v4
19+
- uses: actions/checkout@v5
2020

2121
- name: Install uv
22-
uses: astral-sh/setup-uv@v5
22+
uses: astral-sh/setup-uv@v7
2323
with:
24-
version: "0.6.x"
24+
version: "0.9.x"
2525
enable-cache: true
2626
cache-dependency-glob: "uv.lock"
2727

2828
- name: Set up Python
29-
uses: actions/setup-python@v5
29+
uses: actions/setup-python@v6
3030
with:
3131
python-version-file: "pyproject.toml"
3232

3333
- name: Build package
3434
run: uv build
3535

3636
- name: Publish to PyPI
37-
uses: pypa/gh-action-pypi-publish@release/v1.12
37+
uses: pypa/gh-action-pypi-publish@release/v1.13
3838
with:
3939
print-hash: true
4040

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ ci:
22
autoupdate_schedule: quarterly
33

44
repos:
5-
- repo: https://github.com/psf/black
6-
rev: 25.1.0
5+
- repo: https://github.com/psf/black-pre-commit-mirror
6+
rev: 25.9.0
77
hooks:
88
- id: black
99
- repo: https://github.com/pycqa/isort
10-
rev: 6.0.1
10+
rev: 6.1.0
1111
hooks:
1212
- id: isort
1313
name: isort
@@ -18,7 +18,7 @@ repos:
1818
additional_dependencies:
1919
- flake8-annotations
2020
- repo: https://github.com/pre-commit/pre-commit-hooks
21-
rev: v5.0.0
21+
rev: v6.0.0
2222
hooks:
2323
- id: check-case-conflict
2424
- id: check-json
@@ -35,6 +35,6 @@ repos:
3535
- id: python-check-blanket-type-ignore
3636
- id: python-use-type-annotations
3737
- repo: https://github.com/astral-sh/ruff-pre-commit
38-
rev: v0.12.2
38+
rev: v0.14.0
3939
hooks:
4040
- id: ruff-check

.ruff.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ select = [
1212
"B", # flake8-bugbear
1313
"C4", # flake8-comprehensions
1414
"D", # pydocstyle/flake8-docstrings
15+
"E", # pycodestyle
1516
"F", # Pyflakes
1617
"FIX", # flake8-fixme
1718
"N", # pep8-naming
19+
"W", # pycodestyle
1820
]
1921

2022
ignore = [
@@ -52,6 +54,7 @@ ignore = [
5254

5355
[lint.per-file-ignores]
5456
"tests/test_*.py" = [
57+
"D101",
5558
"D103",
5659
]
5760
"tests/conftest.py" = [

pyproject.toml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ classifiers = [
1717
"Programming Language :: Python :: 3.11",
1818
"Programming Language :: Python :: 3.12",
1919
"Programming Language :: Python :: 3.13",
20+
"Programming Language :: Python :: 3.14",
2021
"Typing :: Typed",
2122
]
2223

@@ -32,17 +33,18 @@ Repository = "https://github.com/sco1/matplotlib-window.git"
3233
Issues = "https://github.com/sco1/matplotlib-window/issues"
3334
Changelog = "https://github.com/sco1/matplotlib-window/blob/main/CHANGELOG.md"
3435

35-
[tool.uv]
36-
dev-dependencies = [
36+
[dependency-groups]
37+
dev = [
3738
"black~=25.0",
3839
"flake8~=7.1",
3940
"flake8-annotations~=3.1",
41+
"flake8-define-class-attributes~=0.2",
4042
"isort~=6.0",
4143
"mypy~=1.11",
4244
"pre-commit~=4.0",
4345
"pytest~=8.3",
44-
"pytest-cov~=6.0",
45-
"pytest-randomly~=3.15",
46+
"pytest-cov~=7.0",
47+
"pytest-randomly~=4.0",
4648
"ruff~=0.7",
4749
"sco1-bumper~=2.0",
4850
"tox~=4.18",
@@ -65,6 +67,7 @@ disallow_incomplete_defs = true
6567
disallow_untyped_calls = true
6668
disallow_untyped_decorators = true
6769
disallow_untyped_defs = true
70+
enable_error_code = "exhaustive-match"
6871
ignore_missing_imports = true
6972
no_implicit_optional = true
7073
show_error_codes = true
@@ -73,6 +76,10 @@ warn_return_any = true
7376
warn_unused_configs = true
7477
warn_unused_ignores = true
7578

79+
[tool.uv.build-backend]
80+
module-name = "matplotlib_window"
81+
module-root = ""
82+
7683
[build-system]
77-
requires = ["hatchling"]
78-
build-backend = "hatchling.build"
84+
requires = ["uv_build"]
85+
build-backend = "uv_build"

tox.ini

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,20 @@ exclude_also =
1515
if __name__ == "__main__":
1616

1717
[tox]
18-
envlist = clean,py{311,312,313}
19-
skip_missing_interpreters = True
20-
minversion = 3.14.0
18+
envlist = clean,py{3.11,3.12,3.13,3.14}
2119
isolated_build = True
20+
skip_missing_interpreters = True
21+
requires =
22+
tox >= 4.0
2223

2324
[testenv]
2425
commands = python -m pytest
2526
deps =
2627
pytest
27-
pytest-check
2828
pytest-cov
2929
pytest-randomly
3030

3131
[testenv:clean]
3232
deps = coverage
3333
skip_install = true
3434
commands = coverage erase
35-
36-
[gh-actions] # For tox GHA
37-
python =
38-
3.11: py311
39-
3.12: py312
40-
3.13: py313

0 commit comments

Comments
 (0)