Skip to content

Commit f231479

Browse files
authored
Always installing the lates version of pre-commit (#87)
* Always installing the lates version of pre-commit * Minimum Python version supported is now 3.9 * Ignored testmon data
1 parent 2059fc4 commit f231479

File tree

7 files changed

+18
-90
lines changed

7 files changed

+18
-90
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ jobs:
1515
~/.cache/pip
1616
~/.cache/pre-commit
1717
key: ${{ runner.os }}-3.11-${{ hashFiles('**/.pre-commit-config.yaml') }}
18-
- run: pip install pre-commit~=2.20
18+
- run: pip install -U pre-commit
1919
- run: pre-commit run -a
2020
testing:
2121
runs-on: ubuntu-latest
2222
strategy:
2323
matrix:
2424
python-version:
25-
- "3.7"
26-
- "3.8"
2725
- "3.9"
2826
- "3.10"
2927
- "3.11"
28+
- "3.12"
29+
- "3.13"
3030
steps:
3131
- uses: actions/checkout@v4
3232
- uses: actions/setup-python@v5
@@ -39,10 +39,9 @@ jobs:
3939
~/.cache/pip
4040
.venv
4141
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('**/poetry.lock') }}
42-
- run: pip install poetry~=1.3
42+
- run: pip install -U poetry
4343
- run: poetry install
4444
- run: make test
45-
# - run: make mypy
4645

4746
publish_package:
4847
runs-on: ubuntu-latest
@@ -61,7 +60,7 @@ jobs:
6160
path: |
6261
~/.cache/pip
6362
key: ${{ runner.os }}-3.10-${{ hashFiles('**/poetry.lock') }}
64-
- run: pip install poetry
63+
- run: pip install -U poetry
6564
- run: poetry build
6665
# From https://packaging.python.org/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/#publishing-the-distribution-to-pypi-and-testpypi
6766
- name: Publish distribution 📦 to PyPI

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,6 @@ ENV/
9494

9595
# Venv
9696
.venv
97+
98+
# testmon
99+
.testmondata*

.pre-commit-config.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ repos:
4949
hooks:
5050
- id: pyupgrade
5151
args:
52-
- "--py37-plus"
53-
- "--keep-runtime-typing"
52+
- "--py39-plus"
5453
- repo: https://github.com/pycqa/isort
5554
rev: 5.13.2
5655
hooks:

littlegit.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import logging
33
import subprocess
44
from pathlib import Path
5-
from typing import List, Union
5+
from typing import Union
66

77
__version__ = "0.2.0"
88

@@ -28,7 +28,7 @@ def __getattr__(self, attr):
2828

2929
return functools.partial(self.__execute, cmd)
3030

31-
def build_cli_args(self, *args, **kwds) -> List[str]:
31+
def build_cli_args(self, *args, **kwds) -> list[str]:
3232
cli_args = []
3333

3434
for k, v in kwds.items():

poetry.lock

Lines changed: 3 additions & 76 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.black]
22
line-length = 99
3-
target-version = ["py37", "py38", "py39", "py310", "py311"]
3+
target-version = ["py39", "py310", "py311", "py312", "py313"]
44
exclude = '''
55
/(
66
.git|.venv
@@ -31,7 +31,7 @@ classifiers = [
3131
]
3232

3333
[tool.poetry.dependencies]
34-
python = "^3.7,<3.12"
34+
python = "^3.9"
3535

3636
[tool.poetry.dev-dependencies]
3737
mypy = "^1.4"

tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import subprocess
22
from pathlib import Path
33
from tempfile import TemporaryDirectory
4-
from typing import Callable, Dict, List
4+
from typing import Callable
55

66
import pytest
77

@@ -40,5 +40,5 @@ def test_init(cast_fn: Callable):
4040
[["HEAD"], {}, ["HEAD"]],
4141
],
4242
)
43-
def test_build_cli_args(repo: Git, args: List, kwds: Dict, expected: List[str]):
43+
def test_build_cli_args(repo: Git, args: list, kwds: dict, expected: list[str]):
4444
assert repo.build_cli_args() == []

0 commit comments

Comments
 (0)