Skip to content

Commit b0edaba

Browse files
authored
Revert "End of year clean up (#177)"
This reverts commit ce9bb9d.
1 parent ce9bb9d commit b0edaba

File tree

6 files changed

+26
-22
lines changed

6 files changed

+26
-22
lines changed

.flake8

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@
44
extend-ignore =
55
E501
66
E203
7+
max-line-length = 88

.github/workflows/python-tests.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: "python tests and coverage"
22
# Uses:
3-
# https://github.com/actions/setup-python : 0b93645e9fea7318ecaed2b359559ac225c90a2b
4-
# https://github.com/actions/checkout : 11bd71901bbe5b1630ceea73d27597364c9af683
5-
# https://github.com/actions/download-artifact : fa0a91b85d4f404e444e00e005971372dc801d16
6-
# https://github.com/actions/upload-artifact : 6f51ac03b9356f520e9adb1b1b7802705f340c2b
3+
# https://github.com/actions/setup-python
4+
# https://github.com/actions/checkout
5+
# https://github.com/actions/download-artifact
6+
# https://github.com/actions/upload-artifact
77

88
on:
99
pull_request:
@@ -33,10 +33,10 @@ jobs:
3333

3434
steps:
3535
- name: "Repo checkout"
36-
uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683"
36+
uses: "actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11"
3737

3838
- name: "Set up Python ${{ matrix.python-version }}"
39-
uses: "actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b"
39+
uses: "actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c"
4040
with:
4141
python-version: "${{ matrix.python-version }}"
4242
allow-prereleases: true
@@ -50,23 +50,22 @@ jobs:
5050
nox --session tests_with_coverage-${{ matrix.python-version }}
5151
5252
- name: "Save coverage artifact"
53-
uses: "actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b"
53+
uses: "actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3"
5454
with:
5555
name: "coverage-artifact-${{ matrix.os}}-${{ matrix.python-version}}"
5656
path: ".coverage.*"
5757
retention-days: 1
58-
include-hidden-files: true
5958

6059
coverage-compile:
6160
name: "coverage compile"
6261
needs: "run-tests-and-coverage"
6362
runs-on: "ubuntu-latest"
6463
steps:
6564
- name: "Repo checkout"
66-
uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683"
65+
uses: "actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11"
6766

6867
- name: "Set up Python"
69-
uses: "actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b"
68+
uses: "actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c"
7069
with:
7170
python-version: "3.12"
7271

@@ -75,7 +74,7 @@ jobs:
7574
python -m pip install --upgrade pip nox
7675
7776
- name: "Download coverage artifacts"
78-
uses: "actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16"
77+
uses: "actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427"
7978
with:
8079
pattern: "coverage-artifact-*"
8180
merge-multiple: true
@@ -92,10 +91,10 @@ jobs:
9291
runs-on: "ubuntu-latest"
9392
steps:
9493
- name: "Repo checkout"
95-
uses: "actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683"
94+
uses: "actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11"
9695

9796
- name: "Set up Python"
98-
uses: "actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b"
97+
uses: "actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c"
9998
with:
10099
python-version: "3.12"
101100

.pre-commit-config.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@ ci:
44
repos:
55
# Batch of helpful formatters and patterns
66
- repo: https://github.com/pre-commit/pre-commit-hooks
7-
rev: "v5.0.0"
7+
rev: "v4.6.0"
88
hooks:
99
- id: check-json
1010
- id: check-toml
1111
- id: check-yaml
1212
- id: trailing-whitespace
1313
- id: end-of-file-fixer
1414
- id: check-docstring-first
15+
- id: debug-statements
16+
- id: mixed-line-ending
1517

1618
# Adds a standard feel to import segments
1719
- repo: https://github.com/pycqa/isort
@@ -27,7 +29,7 @@ repos:
2729

2830
# Format code. No, I don't like everything black does either.
2931
- repo: https://github.com/psf/black-pre-commit-mirror
30-
rev: 24.10.0
32+
rev: 24.4.2
3133
hooks:
3234
- id: black
3335

@@ -43,6 +45,6 @@ repos:
4345

4446
# Type enforcement for Python
4547
- repo: https://github.com/pre-commit/mirrors-mypy
46-
rev: v1.14.0
48+
rev: v1.11.1
4749
hooks:
4850
- id: mypy

noxfile.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,13 @@ def install(session: nox.Session) -> None:
107107
activate_command = f"source {venv_path}/activate"
108108

109109
if not os.path.exists(VENV_PATH):
110-
session.run(py_command, "-m", "venv", VENV_PATH, "--upgrade-deps")
110+
session.run(py_command, "-m", "venv", VENV_PATH)
111+
session.run(f"{venv_path}/python", "-m", "pip", "install", "--upgrade", "pip")
111112

112113
session.run(f"{venv_path}/python", "-m", "pip", "install", "-e", ".[dev,test]")
113114
session.run(f"{venv_path}/pre-commit", "install")
114115

115-
if not venv_path:
116+
if not os.environ.get("VIRTUAL_ENV"):
116117
session.log(f"\n\nRun '{activate_command}' to enter the virtual environment.\n")
117118

118119

pyproject.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@ homepage = "https://github.com/[ORG NAME]/[REPO NAME]"
3838
# [project.scripts]
3939
# python-src-example = "module_name.sample:main"
4040

41-
[tool.black]
42-
line-length = 100
43-
target-version = ['py39']
44-
4541
[tool.setuptools.package-data]
4642
"module_name" = ["py.typed"]
4743

requirements/requirements-dev.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# Development Requirements - linting, formatting, etc.
22

33
pre-commit
4+
black
45
mypy
6+
flake8
7+
flake8-builtins
8+
flake8-pep585
9+
pep8-naming

0 commit comments

Comments
 (0)