Skip to content

Commit 6d0dd46

Browse files
committed
pre-commit: Add pyproject-fmt
1 parent 76edf74 commit 6d0dd46

File tree

4 files changed

+116
-116
lines changed

4 files changed

+116
-116
lines changed

.github/workflows/ci.yaml

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,30 @@ on:
1313
required: false
1414
push:
1515
paths-ignore:
16-
- "news/**"
17-
- "examples/**"
18-
- "peeps/**"
16+
- ".editorconfig"
17+
- ".gitattributes"
18+
- ".gitignore"
19+
- ".gitmodules"
1920
- "*.ini"
2021
- "*.md"
2122
- "**/*.txt"
22-
- ".gitignore"
23-
- ".gitmodules"
24-
- ".gitattributes"
25-
- ".editorconfig"
23+
- "examples/**"
24+
- "news/**"
25+
- "peeps/**"
2626
branches:
2727
- main
2828
pull_request:
2929
paths-ignore:
30-
- "news/**"
31-
- "examples/**"
32-
- "peeps/**"
30+
- ".editorconfig"
31+
- ".gitattributes"
32+
- ".gitignore"
33+
- ".gitmodules"
3334
- "*.ini"
3435
- "*.md"
3536
- "**/*.txt"
36-
- ".gitignore"
37-
- ".gitmodules"
38-
- ".gitattributes"
39-
- ".editorconfig"
37+
- "examples/**"
38+
- "news/**"
39+
- "peeps/**"
4040
permissions:
4141
contents: read # to fetch code (actions/checkout)
4242
jobs:
@@ -49,7 +49,7 @@ jobs:
4949
PYTHONIOENCODING: "utf-8"
5050
GIT_ASK_YESNO: "false"
5151
steps:
52-
- uses: actions/checkout@v3
52+
- uses: actions/checkout@v4
5353
- uses: actions/setup-python@v4
5454
with:
5555
python-version: 3.x
@@ -61,10 +61,10 @@ jobs:
6161
needs: lint
6262
runs-on: ubuntu-latest
6363
steps:
64-
- uses: actions/checkout@v3
64+
- uses: actions/checkout@v4
6565
- uses: actions/setup-python@v4
6666
with:
67-
python-version: "3.11"
67+
python-version: 3.x
6868
- run: |
6969
python -m pip install --upgrade wheel invoke parver beautifulsoup4 towncrier requests parse hatch-fancy-pypi-readme
7070
python -m invoke vendoring.update
@@ -75,16 +75,20 @@ jobs:
7575
strategy:
7676
fail-fast: false
7777
matrix:
78-
python-version: [3.7, 3.8, 3.9, "3.10", "3.11"] # "3.12-dev" Windows CI hangs indefinitely
78+
python-version: [3.7, 3.8, 3.9, "3.10", 3.11, 3.12]
7979
os: [MacOS, Ubuntu, Windows]
80+
exclude: # Python 3.12 on Windows CI hangs indefinitely
81+
- python-version: 3.12
82+
os: Windows
8083

8184
steps:
82-
- uses: actions/checkout@v3
85+
- uses: actions/checkout@v4
8386

8487
- name: Set up Python ${{ matrix.python-version }}
8588
uses: actions/setup-python@v4
8689
with:
8790
python-version: ${{ matrix.python-version }}
91+
allow-prereleases: true
8892

8993
- name: Get python path
9094
id: python-path
@@ -134,7 +138,7 @@ jobs:
134138
needs: lint
135139
runs-on: ubuntu-latest
136140
steps:
137-
- uses: actions/checkout@v3
141+
- uses: actions/checkout@v4
138142
- uses: actions/setup-python@v4
139143
with:
140144
python-version: 3.x

.github/workflows/ruff.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ jobs:
1010
ruff:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
1414
- run: pip install --user ruff
1515
- run: ruff --format=github .

.pre-commit-config.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ repos:
1818
exclude: .patch
1919

2020
- repo: https://github.com/astral-sh/ruff-pre-commit
21-
rev: v0.0.286
21+
rev: v0.0.287
2222
hooks:
2323
- id: ruff
2424
args: [--fix, --exit-non-zero-on-fix]
@@ -52,6 +52,11 @@ repos:
5252
- id: check-manifest
5353
stages: [manual]
5454

55+
- repo: https://github.com/tox-dev/pyproject-fmt
56+
rev: "1.1.0"
57+
hooks:
58+
- id: pyproject-fmt
59+
5560
- repo: https://github.com/abravalheri/validate-pyproject
5661
rev: v0.14
5762
hooks:

pyproject.toml

Lines changed: 85 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
[build-system]
2-
requires = ["setuptools>=67.0.0"]
32
build-backend = "setuptools.build_meta"
4-
3+
requires = [
4+
"setuptools>=67",
5+
]
56

67
[project]
78
name = "pipenv"
9+
description = "Python Development Workflow for Humans."
10+
readme = "README.md"
11+
license = {file = "LICENSE"}
812
authors = [
913
{name = "Pipenv maintainer team", email = "distutils-sig@python.org"},
1014
]
11-
description = "Python Development Workflow for Humans."
12-
readme = "README.md"
1315
requires-python = ">=3.7"
14-
license = {file = "LICENSE"}
1516
classifiers=[
1617
"License :: OSI Approved :: MIT License",
1718
"Programming Language :: Python",
18-
"Programming Language :: Python :: 3",
19+
"Programming Language :: Python :: 3 :: Only",
1920
"Programming Language :: Python :: 3.7",
2021
"Programming Language :: Python :: 3.8",
2122
"Programming Language :: Python :: 3.9",
@@ -24,43 +25,38 @@ classifiers=[
2425
"Programming Language :: Python :: Implementation :: CPython",
2526
"Programming Language :: Python :: Implementation :: PyPy",
2627
]
28+
dynamic = [
29+
"version",
30+
]
2731
dependencies = [
2832
"certifi",
29-
"setuptools>=67.0.0",
33+
"setuptools>=67",
3034
"virtualenv>=20.24.2",
3135
]
32-
dynamic = ["version"]
33-
34-
3536
[project.optional-dependencies]
3637
dev = [
37-
"towncrier",
3838
"beautifulsoup4",
39-
"sphinx",
40-
"flake8>=3.3.0,<4.0",
41-
"black==23.3.0",
42-
"parver",
39+
"black==23.3",
40+
"flake8<4.0,>=3.3",
4341
"invoke",
42+
"parver",
43+
"sphinx",
44+
"towncrier",
4445
]
4546
tests = [
46-
"pytest>=5.0",
47-
"pytest-timeout",
48-
"pytest-xdist",
4947
"flaky",
5048
"mock",
49+
"pytest>=5",
50+
"pytest-timeout",
51+
"pytest-xdist",
5152
]
52-
53-
54-
[project.scripts]
55-
pipenv = "pipenv:cli"
56-
pipenv-resolver = "pipenv.resolver:main"
57-
58-
5953
[project.urls]
60-
Homepage = "https://github.com/pypa/pipenv"
6154
Documentation = "https://pipenv.pypa.io/en/latest/"
55+
Homepage = "https://github.com/pypa/pipenv"
6256
Source = "https://github.com/pypa/pipenv.git"
63-
57+
[project.scripts]
58+
pipenv = "pipenv:cli"
59+
pipenv-resolver = "pipenv.resolver:main"
6460

6561
[tool.setuptools.packages.find]
6662
where = ["."]
@@ -113,73 +109,6 @@ exclude = '''
113109
)
114110
'''
115111

116-
117-
[tool.coverage.run]
118-
parallel = true
119-
120-
121-
[tool.mypy]
122-
ignore_missing_imports = true
123-
follow_imports = "skip"
124-
html_report = "mypyhtml"
125-
python_version = "3.7"
126-
mypy_path = "typeshed/pyi:typeshed/imports"
127-
128-
129-
[tool.pytest.ini_options]
130-
addopts = "-ra"
131-
plugins = "xdist"
132-
testpaths = ["tests"]
133-
# Add vendor and patched in addition to the default list of ignored dirs
134-
# Additionally, ignore tasks, news, test subdirectories and peeps directory
135-
norecursedirs = [
136-
".*",
137-
"build",
138-
"dist",
139-
"CVS",
140-
"_darcs",
141-
"{arch}",
142-
"*.egg",
143-
"vendor",
144-
"patched",
145-
"news",
146-
"tasks",
147-
"docs",
148-
"tests/test_artifacts",
149-
"tests/pypi",
150-
"peeps",
151-
]
152-
filterwarnings = []
153-
# These are not all the custom markers, but most of the ones with repeat uses
154-
# `pipenv run pytest --markers` will list all markers including these
155-
markers = [
156-
"install: tests having to do with `pipenv install`",
157-
"update: tests having to do with `pipenv update`",
158-
"needs_internet: integration tests that require internet to pass",
159-
"basic: basic pipenv tests grouping",
160-
"dev: tests having to do with dev and dev packages",
161-
"system: related or interacting with the os",
162-
"utils: grouping of pipenv utility functions",
163-
"cli: test grouping that relate to command line like `pipenv --flag args`",
164-
"requirements: tests that save and alter pip requirements",
165-
"run: tests that run or execute python through pipenv",
166-
"script: grouping of tests that execute scripts",
167-
"keep_outdated: when an activity is supposed to keep something out of date",
168-
"lock: tests that interact with pipenv lock",
169-
"markers: pipenv environment markers",
170-
"vcs: tests integration with pipenv and vertsion control systems",
171-
"project: tests with the project object",
172-
"sync: related to `pipenv sync`",
173-
"rrule: relating to rrules (as in recurring time)",
174-
"tzoffset: timezone offset",
175-
"gettz: tests with gettz (get timezone) from dateutil lib",
176-
"tzstr: timezone string",
177-
"extras",
178-
"extended",
179-
"ext: extra non-categorized tests",
180-
]
181-
182-
183112
[tool.ruff]
184113
exclude = [
185114
"pipenv/patched/*",
@@ -240,6 +169,68 @@ max-statements = 155
240169
"tests/unit/test_funktools.py" = ["B015"]
241170
"tests/unit/test_utils.py" = ["F811"]
242171

172+
[tool.pytest.ini_options]
173+
addopts = "-ra"
174+
plugins = "xdist"
175+
testpaths = ["tests"]
176+
# Add vendor and patched in addition to the default list of ignored dirs
177+
# Additionally, ignore tasks, news, test subdirectories and peeps directory
178+
norecursedirs = [
179+
".*",
180+
"build",
181+
"dist",
182+
"CVS",
183+
"_darcs",
184+
"{arch}",
185+
"*.egg",
186+
"vendor",
187+
"patched",
188+
"news",
189+
"tasks",
190+
"docs",
191+
"tests/test_artifacts",
192+
"tests/pypi",
193+
"peeps",
194+
]
195+
filterwarnings = []
196+
# These are not all the custom markers, but most of the ones with repeat uses
197+
# `pipenv run pytest --markers` will list all markers including these
198+
markers = [
199+
"install: tests having to do with `pipenv install`",
200+
"update: tests having to do with `pipenv update`",
201+
"needs_internet: integration tests that require internet to pass",
202+
"basic: basic pipenv tests grouping",
203+
"dev: tests having to do with dev and dev packages",
204+
"system: related or interacting with the os",
205+
"utils: grouping of pipenv utility functions",
206+
"cli: test grouping that relate to command line like `pipenv --flag args`",
207+
"requirements: tests that save and alter pip requirements",
208+
"run: tests that run or execute python through pipenv",
209+
"script: grouping of tests that execute scripts",
210+
"keep_outdated: when an activity is supposed to keep something out of date",
211+
"lock: tests that interact with pipenv lock",
212+
"markers: pipenv environment markers",
213+
"vcs: tests integration with pipenv and vertsion control systems",
214+
"project: tests with the project object",
215+
"sync: related to `pipenv sync`",
216+
"rrule: relating to rrules (as in recurring time)",
217+
"tzoffset: timezone offset",
218+
"gettz: tests with gettz (get timezone) from dateutil lib",
219+
"tzstr: timezone string",
220+
"extras",
221+
"extended",
222+
"ext: extra non-categorized tests",
223+
]
224+
225+
[tool.coverage.run]
226+
parallel = true
227+
228+
[tool.mypy]
229+
ignore_missing_imports = true
230+
follow_imports = "skip"
231+
html_report = "mypyhtml"
232+
python_version = "3.7"
233+
mypy_path = "typeshed/pyi:typeshed/imports"
243234

244235
[tool.towncrier]
245236
package = "pipenv"

0 commit comments

Comments
 (0)