Skip to content

Commit d6093d7

Browse files
authored
Merge pull request #299 from fferegrino/drop-3.8
Drop Python 3.8
2 parents 8072181 + 1345c5b commit d6093d7

File tree

9 files changed

+1356
-1118
lines changed

9 files changed

+1356
-1118
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ jobs:
1212
name: Build and publish Python distributions to TestPyPI
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@master
15+
- uses: actions/checkout@v4
1616
- uses: pdm-project/setup-pdm@main
1717
name: Setup Python and PDM
1818
with:
19-
python-version: 3.9
19+
python-version: 3.11
2020
- name: Build package
2121
run: make build-package
2222
- name: Publish distribution to Test PyPI
23-
uses: pypa/gh-action-pypi-publish@master
23+
uses: pypa/gh-action-pypi-publish@release/v1
2424
with:
2525
password: ${{ secrets.test_pypi_password }}
2626
repository_url: https://test.pypi.org/legacy/
@@ -29,15 +29,15 @@ jobs:
2929
runs-on: ubuntu-latest
3030
steps:
3131
- name: Checkout
32-
uses: actions/checkout@v2
32+
uses: actions/checkout@v4
3333
with:
3434
# Number of commits to fetch. 0 indicates all history.
3535
# Default: 1
3636
fetch-depth: 0
3737
- uses: pdm-project/setup-pdm@main
3838
name: Setup Python and PDM
3939
with:
40-
python-version: 3.9
40+
python-version: 3.11
4141
- name: Install dependencies
4242
run: make install
4343
- name: Build the Documentation

.github/workflows/install.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ jobs:
1111
strategy:
1212
max-parallel: 3
1313
matrix:
14-
python-version: [3.8, 3.9, '3.10', '3.11']
14+
python-version: [3.9, '3.10', '3.11']
1515
steps:
16-
- uses: actions/checkout@v1
16+
- uses: actions/checkout@v4
1717
- name: Set up Python ${{ matrix.python-version }}
18-
uses: actions/setup-python@v1
18+
uses: actions/setup-python@v5
1919
with:
2020
python-version: ${{ matrix.python-version }}
2121
- name: Install the program

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ jobs:
1414
strategy:
1515
max-parallel: 4
1616
matrix:
17-
python-version: [3.8, 3.9, '3.10', '3.11']
17+
python-version: [3.9, '3.10', '3.11']
1818
steps:
19-
- uses: actions/checkout@v1
19+
- uses: actions/checkout@v4
2020
- name: Set up Python ${{ matrix.python-version }}
21-
uses: actions/setup-python@v1
21+
uses: actions/setup-python@v5
2222
with:
2323
python-version: ${{ matrix.python-version }}
2424
- name: Install program

.github/workflows/update.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ jobs:
99
Update:
1010
runs-on: ubuntu-latest
1111
steps:
12-
- uses: actions/checkout@master
12+
- uses: actions/checkout@v4
1313
with:
1414
persist-credentials: false
1515
fetch-depth: 0
1616
- name: Set up Python
17-
uses: actions/setup-python@v1
17+
uses: actions/setup-python@v5
1818
with:
19-
python-version: 3.9
19+
python-version: 3.11
2020
- name: Install program
2121
run: |
2222
# All these steps are required so that mypy behaves equally than the

.safety-policy.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ security: # configuration for the `safety check` command
1010
# We recommend making use of the optional `reason` and `expires` keys for each vulnerability that you ignore.
1111
70612: # Example vulnerability ID
1212
reason: we don't use jinja2 from_string
13+
76170:
14+
reason: Temporary ignore while upgrading Python versions and dropping 3.8 support
15+
expires: '2025-10-31'
1316
continue-on-vulnerability-error: False # Suppress non-zero exit codes when vulnerabilities are found. Enable this in pipelines and CI/CD processes if you want to pass builds that have vulnerabilities. We recommend you set this to False.
1417
alert: # configuration for the `safety alert` command
1518
security:

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ plugins:
1313
- mkdocstrings:
1414
handlers:
1515
python:
16-
rendering:
16+
options:
1717
show_root_heading: true
1818
heading_level: 1
1919
- autolinks

pdm.lock

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

pyproject.toml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ classifiers=[
4242
"Operating System :: POSIX",
4343
"Programming Language :: Python",
4444
"Programming Language :: Python :: 3",
45-
"Programming Language :: Python :: 3.8",
4645
"Programming Language :: Python :: 3.9",
4746
"Programming Language :: Python :: 3.10",
4847
"Programming Language :: Python :: 3.11",
@@ -270,6 +269,7 @@ pylint = [
270269
"-W1201", # Use lazy % formatting in logging functions. Deprecated rule in favor of
271270
# f-strings.
272271
"-C0301", # Lines too long. Already covered by E501.
272+
"-R0917", # Too many positional arguments
273273
]
274274
mccabe = ["+*"]
275275
pep8-naming = ["+*"]
@@ -288,6 +288,12 @@ pyflakes = [
288288
]
289289

290290
[tool.flakeheaven.exceptions."tests/"]
291+
flake8-aaa = [
292+
"-AAA01 ", # no Act block found in test
293+
"-AAA03", # expected 1 blank line before Act block, found none
294+
"-AAA04", # expected 1 blank line before Assert block, found none
295+
"-AAA05", # blank line in block
296+
]
291297
flake8-docstrings = [
292298
"-D205", # 1 blank line required between summary line and description
293299
"-D212", # Multi-line docstring summary should start at the first line
@@ -296,17 +302,25 @@ flake8-docstrings = [
296302
]
297303
flake8-annotations = [
298304
"-ANN001",
305+
"-ANN201", # Missing return type annotation for public function
299306
"-ANN401", # Dynamically typed expressions (typing.Any) are disallowed
300307
]
308+
flake8-pytest-style = [
309+
"-PT023", # use @pytest.mark.secondary over @pytest.mark.secondary(
310+
]
301311
pylint = [
302312
"-R0201", # Method could be a function. Raised because the methods of a test class
303313
# don't use the self object, which is not wrong.
304314
"-W0613", # Unused argument in function, but in tests there are fixtures that even
305315
# though they are not used in the function directly, they are used to
306316
# configure the test.
317+
"-W0621", # Redefining name 'xyz' from outer scope
307318
"-R0904", # Too many public methods (25/20) (too-many-public-methods)
308319
"-C0302", # Allows module to have unlimited number of lines.
309320
]
321+
pycodestyle = [
322+
"-E501", # line too long
323+
]
310324

311325
[tool.flakeheaven.exceptions."tests/factories.py"]
312326
pylint = [

src/yamlfix/entrypoints/cli.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
from typing import Dict, List, Optional, Tuple
88

99
import click
10-
from _io import TextIOWrapper
1110

1211
from yamlfix import services, version
1312
from yamlfix.config import configure_yamlfix
1413
from yamlfix.entrypoints import load_logger
1514
from yamlfix.model import YamlfixConfig
15+
from yamlfix.services import Files
1616

1717
log = logging.getLogger(__name__)
1818

@@ -90,11 +90,11 @@ def cli( # pylint: disable=too-many-arguments
9090
9191
Use - to read from stdin. No other files can be specified in this case.
9292
"""
93-
files_to_fix: List[TextIOWrapper] = []
93+
files_to_fix: Files = []
9494
if "-" in files:
9595
if len(files) > 1:
9696
raise ValueError("Cannot specify '-' and other files at the same time.")
97-
files_to_fix = [sys.stdin]
97+
files_to_fix = (sys.stdin,) # type: ignore[assignment]
9898
else:
9999
paths = [Path(file) for file in files]
100100
real_files = []

0 commit comments

Comments
 (0)