Skip to content

Commit 5dd21d2

Browse files
authored
Merge pull request #248 from 56kyle/release/1.1.1
Release/1.1.1
2 parents c0bfd76 + c17a111 commit 5dd21d2

23 files changed

+1423
-1508
lines changed

.coveragerc

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[paths]
2+
source =
3+
src
4+
*/site-packages
5+
tests =
6+
tests
7+
*/tests
8+
9+
[run]
10+
branch = true
11+
source =
12+
pytest_static
13+
tests
14+
15+
[report]
16+
exclude_also =
17+
if TYPE_CHECKING:
18+
show_missing = true
19+
fail_under = 100

.github/workflows/constraints.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ pip==24.2
22
nox==2024.4.15
33
nox-poetry==1.0.3
44
poetry==1.8.3
5-
virtualenv==20.26.3
5+
virtualenv==20.27.0

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Set up Python
2424
uses: actions/setup-python@v5
2525
with:
26-
python-version: "3.12"
26+
python-version: "3.13"
2727

2828
- name: Upgrade pip
2929
run: |

.github/workflows/tests.yml

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,23 @@ jobs:
1212
fail-fast: false
1313
matrix:
1414
include:
15-
- { python: "3.12", os: "ubuntu-latest", session: "pre-commit" }
16-
- { python: "3.12", os: "ubuntu-latest", session: "safety" }
15+
- { python: "3.13", os: "ubuntu-latest", session: "pre-commit" }
16+
- { python: "3.13", os: "ubuntu-latest", session: "safety" }
17+
- { python: "3.13", os: "ubuntu-latest", session: "mypy" }
1718
- { python: "3.12", os: "ubuntu-latest", session: "mypy" }
1819
- { python: "3.11", os: "ubuntu-latest", session: "mypy" }
1920
- { python: "3.10", os: "ubuntu-latest", session: "mypy" }
2021
- { python: "3.9", os: "ubuntu-latest", session: "mypy" }
22+
- { python: "3.13", os: "ubuntu-latest", session: "tests" }
2123
- { python: "3.12", os: "ubuntu-latest", session: "tests" }
2224
- { python: "3.11", os: "ubuntu-latest", session: "tests" }
2325
- { python: "3.10", os: "ubuntu-latest", session: "tests" }
2426
- { python: "3.9", os: "ubuntu-latest", session: "tests" }
25-
- { python: "3.12", os: "windows-latest", session: "tests" }
26-
- { python: "3.12", os: "macos-latest", session: "tests" }
27-
- { python: "3.12", os: "ubuntu-latest", session: "typeguard" }
28-
- { python: "3.12", os: "ubuntu-latest", session: "xdoctest" }
29-
- { python: "3.12", os: "ubuntu-latest", session: "docs-build" }
27+
- { python: "3.13", os: "windows-latest", session: "tests" }
28+
- { python: "3.13", os: "macos-latest", session: "tests" }
29+
- { python: "3.13", os: "ubuntu-latest", session: "typeguard" }
30+
- { python: "3.13", os: "ubuntu-latest", session: "xdoctest" }
31+
- { python: "3.13", os: "ubuntu-latest", session: "docs-build" }
3032

3133
env:
3234
NOXSESSION: ${{ matrix.session }}
@@ -97,18 +99,20 @@ jobs:
9799
98100
- name: Upload coverage data
99101
if: always() && matrix.session == 'tests'
100-
uses: "actions/upload-artifact@v3"
102+
uses: "actions/upload-artifact@v4"
101103
with:
102-
name: coverage-data
104+
name: coverage-data-${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python }}
103105
path: ".coverage.*"
104106
include-hidden-files: true
107+
overwrite: "true"
105108

106109
- name: Upload documentation
107110
if: matrix.session == 'docs-build'
108-
uses: actions/upload-artifact@v3
111+
uses: actions/upload-artifact@v4
109112
with:
110113
name: docs
111114
path: docs/_build
115+
overwrite: "true"
112116

113117
coverage:
114118
runs-on: ubuntu-latest
@@ -120,7 +124,7 @@ jobs:
120124
- name: Set up Python
121125
uses: actions/setup-python@v5
122126
with:
123-
python-version: "3.12"
127+
python-version: "3.13"
124128

125129
- name: Upgrade pip
126130
run: |
@@ -139,9 +143,10 @@ jobs:
139143
nox --version
140144
141145
- name: Download coverage data
142-
uses: actions/download-artifact@v3
146+
uses: actions/download-artifact@v4
143147
with:
144-
name: coverage-data
148+
pattern: coverage-data-*
149+
merge-multiple: "true"
145150

146151
- name: Combine coverage data and display human readable report
147152
run: |

.mypy.ini

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[mypy]
2+
strict = true
3+
warn_unreachable = true
4+
pretty = true
5+
show_column_numbers = true
6+
show_error_context = true

.pre-commit-config.yaml

Lines changed: 8 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,6 @@
11
repos:
22
- repo: local
33
hooks:
4-
- id: bandit
5-
name: bandit
6-
entry: bandit
7-
language: system
8-
types: [python]
9-
require_serial: true
10-
args: ["-c", "bandit.yml"]
11-
- id: black
12-
name: black
13-
entry: black
14-
language: system
15-
types: [python]
16-
require_serial: true
174
- id: check-added-large-files
185
name: Check for added large files
196
entry: check-added-large-files
@@ -40,27 +27,19 @@ repos:
4027
language: system
4128
types: [text]
4229
stages: [commit, push, manual]
43-
- id: flake8
44-
name: flake8
45-
entry: flake8
30+
- id: ruff-lint
31+
name: Ruff Lint
32+
entry: ruff check
4633
language: system
4734
types: [python]
4835
require_serial: true
49-
args: [--darglint-ignore-regex, .*]
50-
- id: isort
51-
name: isort
52-
entry: isort
53-
require_serial: true
54-
language: system
55-
types_or: [cython, pyi, python]
56-
args: ["--filter-files"]
57-
- id: pyupgrade
58-
name: pyupgrade
59-
description: Automatically upgrade syntax for newer versions.
60-
entry: pyupgrade
36+
args: [--fix]
37+
- id: ruff-format
38+
name: Ruff Format
39+
entry: ruff format
6140
language: system
6241
types: [python]
63-
args: [--py37-plus]
42+
require_serial: true
6443
- id: trailing-whitespace
6544
name: Trim Trailing Whitespace
6645
entry: trailing-whitespace-fixer

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: 2
22
build:
33
os: ubuntu-20.04
44
tools:
5-
python: "3.12"
5+
python: "3.13"
66
sphinx:
77
configuration: docs/conf.py
88
formats: all

.ruff.toml

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
2+
# Exclude a variety of commonly ignored directories.
3+
exclude = [
4+
".bzr",
5+
".direnv",
6+
".eggs",
7+
".git",
8+
".git-rewrite",
9+
".hg",
10+
".ipynb_checkpoints",
11+
".mypy_cache",
12+
".nox",
13+
".pants.d",
14+
".pyenv",
15+
".pytest_cache",
16+
".pytype",
17+
".ruff_cache",
18+
".svn",
19+
".tox",
20+
".venv",
21+
".vscode",
22+
"__pypackages__",
23+
"_build",
24+
"buck-out",
25+
"build",
26+
"dist",
27+
"node_modules",
28+
"site-packages",
29+
"venv",
30+
]
31+
32+
# Same as Black.
33+
line-length = 120
34+
indent-width = 4
35+
36+
# Assume Python 3.9
37+
target-version = "py39"
38+
39+
[lint]
40+
# https://docs.astral.sh/ruff/rules
41+
select = [
42+
"A",
43+
"ARG",
44+
"B",
45+
"B9",
46+
"BLE",
47+
"C",
48+
"C4",
49+
"D",
50+
"DTZ",
51+
"E",
52+
"F",
53+
"I",
54+
"N",
55+
"PT",
56+
"PTH",
57+
"Q",
58+
"RET",
59+
"RUF",
60+
"S",
61+
"SIM",
62+
"SLF",
63+
"T10",
64+
"TC",
65+
"W"
66+
]
67+
ignore = ["E203", "E501"]
68+
69+
70+
# Allow fix for all enabled rules (when `--fix`) is provided.
71+
fixable = ["ALL"]
72+
unfixable = []
73+
74+
# Allow unused variables when underscore-prefixed.
75+
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
76+
77+
[lint.flake8-quotes]
78+
inline-quotes = "double"
79+
80+
[lint.isort]
81+
force-single-line = true
82+
lines-after-imports = 2
83+
84+
[lint.mccabe]
85+
max-complexity = 10
86+
87+
[lint.per-file-ignores]
88+
"tests/*" = [
89+
"S101",
90+
"D100",
91+
"D101",
92+
"D102",
93+
"D103",
94+
"D104",
95+
"ARG001",
96+
"C408",
97+
"SLF001"
98+
]
99+
"exceptions.py" = ["D107"]
100+
"noxfile.py" = ["S101"]
101+
102+
[lint.pydocstyle]
103+
convention = "google"
104+
105+
[format]
106+
# Like Black, use double quotes for strings.
107+
quote-style = "double"
108+
109+
# Like Black, indent with spaces, rather than tabs.
110+
indent-style = "space"
111+
112+
# Like Black, respect magic trailing commas.
113+
skip-magic-trailing-comma = false
114+
115+
# Like Black, automatically detect the appropriate line ending.
116+
line-ending = "auto"
117+
118+
# Enable auto-formatting of code examples in docstrings. Markdown,
119+
# reStructuredText code/literal blocks and doctests are all supported.
120+
#
121+
# This is currently disabled by default, but it is planned for this
122+
# to be opt-out in the future.
123+
docstring-code-format = false
124+
125+
# Set the line length limit used when formatting code snippets in
126+
# docstrings.
127+
#
128+
# This only has an effect when the `docstring-code-format` setting is
129+
# enabled.
130+
docstring-code-line-length = "dynamic"

bandit.yml

Lines changed: 0 additions & 2 deletions
This file was deleted.

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
project = "pytest-static"
44
author = "Kyle Oliver"
5-
copyright = "2023, Kyle Oliver"
5+
copyright = "2023, Kyle Oliver" # noqa: A001
66
extensions = [
77
"sphinx.ext.autodoc",
88
"sphinx.ext.napoleon",

0 commit comments

Comments
 (0)