Skip to content

Commit

Permalink
Merge pull request #52 from hugovk/add-3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk authored Jun 24, 2024
2 parents 1470112 + 068b1d6 commit fce7dc5
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 44 deletions.
2 changes: 0 additions & 2 deletions .flake8

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cache/pip
Expand All @@ -25,7 +25,7 @@ jobs:
lint-
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.x"

Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,23 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["pypy3.9", "3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["pypy3.10", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
os: [windows-latest, macos-latest, ubuntu-latest]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
cache: pip
cache-dependency-path: pyproject.toml

- name: Install dependencies
run: |
python -m pip install --upgrade tox
- name: Tox tests
shell: bash
run: |
tox -e py
55 changes: 24 additions & 31 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,52 +1,47 @@
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.15.2
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.2
hooks:
- id: pyupgrade
args: [--py38-plus]
- id: ruff
args: [--exit-non-zero-on-fix]

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.3.0
rev: 24.4.2
hooks:
- id: black

- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
args: [--add-import=from __future__ import annotations]

- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
hooks:
- id: flake8
additional_dependencies: [flake8-2020]

- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.10.0
hooks:
- id: python-check-blanket-noqa
- id: python-no-log-warn

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: debug-statements
- id: end-of-file-fixer
- id: forbid-submodules
- id: trailing-whitespace

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.2
hooks:
- id: check-github-workflows

- repo: https://github.com/rhysd/actionlint
rev: v1.6.27
hooks:
- id: actionlint

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
rev: v1.10.0
hooks:
- id: mypy
args: [--strict, --pretty, --show-error-codes]
additional_dependencies: [more-itertools]

- repo: https://github.com/tox-dev/pyproject-fmt
rev: 1.7.0
rev: 1.8.0
hooks:
- id: pyproject-fmt

Expand All @@ -66,12 +61,10 @@ repos:
- id: prettier
args: [--prose-wrap=always, --print-width=88]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
- repo: meta
hooks:
- id: mypy
args: [--strict]
additional_dependencies: [more-itertools]
- id: check-hooks-apply
- id: check-useless-excludes

ci:
autoupdate_schedule: quarterly
34 changes: 32 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ requires = [
"flit_core<4,>=3",
]

[tool.flit.entrypoints."flake8.extension"]
ISC = "flake8_implicit_str_concat:Checker"
[tool.flit.metadata]
module = "flake8_implicit_str_concat"
description-file = "README.md"
Expand All @@ -24,6 +26,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Quality Assurance",
Expand All @@ -33,5 +36,32 @@ requires = [
"more-itertools >=8.0.2; python_version <= '3.9'",
]

[tool.flit.entrypoints."flake8.extension"]
ISC = "flake8_implicit_str_concat:Checker"
[tool.ruff]
fix = true

[tool.ruff.lint]
select = [
"C4", # flake8-comprehensions
"E", # pycodestyle errors
"EM", # flake8-errmsg
"F", # pyflakes errors
"I", # isort
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"PGH", # pygrep-hooks
"PYI", # flake8-pyi
"RUF100", # unused noqa (yesqa)
"RUF022", # unsorted-dunder-all
"UP", # pyupgrade
"W", # pycodestyle warnings
"YTT", # flake8-2020
]
ignore = [
"E203", # Whitespace before ':'
"E221", # Multiple spaces before operator
"E226", # Missing whitespace around arithmetic operator
"E241", # Multiple spaces after ','
]

[tool.ruff.lint.isort]
required-imports = ["from __future__ import annotations"]
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ requires =
env_list =
lint
mypy
py{py3, 312, 311, 310, 39, 38}
py{py3, 313, 312, 311, 310, 39, 38}

[testenv]
deps =
Expand Down

0 comments on commit fce7dc5

Please sign in to comment.