Skip to content

Commit e1e7914

Browse files
author
jsf9k
committed
2 parents 15af5f1 + c4e7a2a commit e1e7914

7 files changed

Lines changed: 37 additions & 39 deletions

File tree

.github/workflows/build.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ jobs:
100100
permissions_monitoring_config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
101101
- id: setup-env
102102
uses: cisagov/setup-env-github-action@v1
103-
- uses: actions/checkout@v5
103+
- uses: actions/checkout@v6
104104
- id: setup-python
105105
uses: actions/setup-python@v6
106106
with:
@@ -251,7 +251,7 @@ jobs:
251251
# monitoring configuration *does not* require you to modify
252252
# this workflow.
253253
permissions_monitoring_config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
254-
- uses: actions/checkout@v5
254+
- uses: actions/checkout@v6
255255
- id: setup-python
256256
uses: actions/setup-python@v6
257257
with:
@@ -324,7 +324,7 @@ jobs:
324324
# monitoring configuration *does not* require you to modify
325325
# this workflow.
326326
permissions_monitoring_config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
327-
- uses: actions/checkout@v5
327+
- uses: actions/checkout@v6
328328
- name: Finished coveralls reports
329329
uses: coverallsapp/github-action@v2
330330
with:
@@ -378,7 +378,7 @@ jobs:
378378
# monitoring configuration *does not* require you to modify
379379
# this workflow.
380380
permissions_monitoring_config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
381-
- uses: actions/checkout@v5
381+
- uses: actions/checkout@v6
382382
- id: setup-python
383383
uses: actions/setup-python@v6
384384
with:
@@ -404,7 +404,7 @@ jobs:
404404
- name: Build artifacts
405405
run: python -m build
406406
- name: Upload artifacts
407-
uses: actions/upload-artifact@v5
407+
uses: actions/upload-artifact@v6
408408
with:
409409
name: dist-${{ matrix.python-version }}
410410
path: dist
@@ -463,7 +463,7 @@ jobs:
463463
# monitoring configuration *does not* require you to modify
464464
# this workflow.
465465
permissions_monitoring_config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
466-
- uses: actions/checkout@v5
466+
- uses: actions/checkout@v6
467467
- id: setup-python
468468
uses: actions/setup-python@v6
469469
with:
@@ -484,7 +484,7 @@ jobs:
484484
restore-keys: |
485485
${{ env.BASE_CACHE_KEY }}
486486
- name: Retrieve the built wheel
487-
uses: actions/download-artifact@v6
487+
uses: actions/download-artifact@v7
488488
with:
489489
name: dist-${{ matrix.python-version }}
490490
path: dist

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ jobs:
114114
permissions_monitoring_config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
115115

116116
- name: Checkout repository
117-
uses: actions/checkout@v5
117+
uses: actions/checkout@v6
118118

119119
# Initializes the CodeQL tools for scanning.
120120
- name: Initialize CodeQL

.github/workflows/dependency-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
permissions_monitoring_config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
9090
- id: checkout-repo
9191
name: Checkout the repository
92-
uses: actions/checkout@v5
92+
uses: actions/checkout@v6
9393
- id: dependency-review
9494
name: Review dependency changes for vulnerabilities and license changes
9595
uses: actions/dependency-review-action@v4

.github/workflows/sync-labels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
# monitoring configuration *does not* require you to modify
8585
# this workflow.
8686
permissions_monitoring_config: ${{ vars.ACTIONS_PERMISSIONS_CONFIG }}
87-
- uses: actions/checkout@v5
87+
- uses: actions/checkout@v6
8888
- name: Sync repository labels
8989
if: success()
9090
uses: crazy-max/ghaction-github-labeler@v5

.pre-commit-config.yaml

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,10 @@ repos:
169169
- id: mypy
170170
# IMPORTANT: Keep type hinting-related dependencies of the
171171
# mypy pre-commit hook additional_dependencies in sync with
172-
# the dev section of setup.py to avoid discrepancies in type
173-
# checking between environments.
172+
# the dev section of pyproject.toml to avoid discrepancies in
173+
# type checking between environments.
174174
additional_dependencies:
175175
- types-docopt
176-
- types-setuptools
177176
- repo: https://github.com/pypa/pip-audit
178177
rev: v2.9.0
179178
hooks:
@@ -190,10 +189,16 @@ repos:
190189
rev: v3.21.1
191190
hooks:
192191
- id: pyupgrade
192+
args:
193+
# Python 3.10 is currently the oldest non-EOL version of
194+
# Python, so we want to apply all rules that apply to this
195+
# version or later. See here for more details:
196+
# https://www.gyford.com/phil/writing/2025/08/26/how-to-use-pyupgrade/
197+
- --py310-plus
193198

194199
# Ansible hooks
195200
- repo: https://github.com/ansible/ansible-lint
196-
rev: v25.11.0
201+
rev: v25.11.1
197202
hooks:
198203
- id: ansible-lint
199204
additional_dependencies:
@@ -209,31 +214,13 @@ repos:
209214
# hook identifies a vulnerability in ansible-core 2.16.13,
210215
# but all versions of ansible 9 have a dependency on
211216
# ~=2.16.X.
212-
#
213-
# It is also a good idea to go ahead and upgrade to version
214-
# 10 since version 9 is going EOL at the end of November:
215-
# https://endoflife.date/ansible
216217
# - ansible>=10,<11
217-
# ansible-core 2.16.3 through 2.16.6 suffer from the bug
218-
# discussed in ansible/ansible#82702, which breaks any
219-
# symlinked files in vars, tasks, etc. for any Ansible role
220-
# installed via ansible-galaxy. Hence we never want to
221-
# install those versions.
222-
#
223-
# Note that the pip-audit pre-commit hook identifies a
224-
# vulnerability in ansible-core 2.16.13. The pin of
225-
# ansible-core to >=2.17 effectively also pins ansible to
226-
# >=10.
227-
#
228-
# It is also a good idea to go ahead and upgrade to
229-
# ansible-core 2.17 since security support for ansible-core
230-
# 2.16 ends this month:
231-
# https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html#ansible-core-support-matrix
218+
# ansible-core<2.17.7 suffers from GHSA-99w6-3xph-cx78.
232219
#
233220
# Note that any changes made to this dependency must also be
234221
# made in requirements.txt in cisagov/skeleton-packer and
235222
# requirements-test.txt in cisagov/skeleton-ansible-role.
236-
- ansible-core>=2.17
223+
- ansible-core>=2.17.7
237224

238225
# Terraform hooks
239226
- repo: https://github.com/antonbabenko/pre-commit-terraform

pyproject.toml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,17 @@
33
# https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
44
[build-system]
55
build-backend = "setuptools.build_meta"
6-
requires = ["setuptools"]
6+
requires = [
7+
# 61.0.0 was the first version of setuptools to offer a full-fledged
8+
# backend that uses pyproject.toml for metadata configuration (in
9+
# compliance with PEP 621):
10+
# https://setuptools.pypa.io/en/stable/history.html#v61-0-0
11+
#
12+
# 77.0.0 was the first version of setuptools to support license
13+
# expressions (in compliance with PEP 639):
14+
# https://setuptools.pypa.io/en/stable/history.html#v77-0-0
15+
"setuptools>=77.0.0"
16+
]
717

818
[project]
919
authors = [
@@ -51,8 +61,9 @@ requires-python = ">=3.10"
5161
# field of the mypy pre-commit hook to avoid discrepancies in type
5262
# checking between environments.
5363
dev = [
64+
"build",
65+
"twine",
5466
"types-docopt",
55-
"types-setuptools",
5667
]
5768
test = [
5869
"coverage",

src/example/example.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import logging
2525
import os
2626
import sys
27-
from typing import Any, Dict
27+
from typing import Any
2828

2929
# Third-Party Libraries
3030
import docopt
@@ -50,7 +50,7 @@ def example_div(dividend: int, divisor: int) -> float:
5050

5151
def main() -> None:
5252
"""Set up logging and call the example function."""
53-
args: Dict[str, str] = docopt.docopt(__doc__, version=__version__)
53+
args: dict[str, str] = docopt.docopt(__doc__, version=__version__)
5454
# Validate and convert arguments as needed
5555
schema: Schema = Schema(
5656
{
@@ -72,7 +72,7 @@ def main() -> None:
7272
)
7373

7474
try:
75-
validated_args: Dict[str, Any] = schema.validate(args)
75+
validated_args: dict[str, Any] = schema.validate(args)
7676
except SchemaError as err:
7777
# Exit because one or more of the arguments were invalid
7878
print(err, file=sys.stderr)

0 commit comments

Comments
 (0)