Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, '3.10', '3.11']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: install dependencies
Expand Down
24 changes: 11 additions & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ci:
autoupdate_schedule: monthly
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v6.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -15,35 +15,33 @@ repos:
- id: requirements-txt-fixer
- id: double-quote-string-fixer
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
rev: 7.3.0
hooks:
- id: flake8
additional_dependencies: [flake8-typing-imports==1.14.0]
args: [--min-python-version=3.8]
- repo: https://github.com/pre-commit/mirrors-autopep8
rev: v2.0.2
args: [--min-python-version=3.9]
- repo: https://github.com/hhatto/autopep8
rev: v2.3.2
hooks:
- id: autopep8
- repo: https://github.com/asottile/reorder-python-imports
rev: v3.10.0
rev: v3.15.0
hooks:
- id: reorder-python-imports
args: [--py3-plus]
- repo: https://github.com/asottile/add-trailing-comma
rev: v3.0.0
rev: v3.2.0
hooks:
- id: add-trailing-comma
args: [--py36-plus]
- repo: https://github.com/asottile/pyupgrade
rev: v3.8.0
rev: v3.20.0
hooks:
- id: pyupgrade
args: [--py38-plus]
args: [--py39-plus]
- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.4.0
rev: v2.8.0
hooks:
- id: setup-cfg-fmt
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.4.1
rev: v1.18.2
hooks:
- id: mypy
9 changes: 3 additions & 6 deletions flake8_timeout.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
import ast
import importlib.metadata as importlib_metadata
from collections.abc import Generator
from typing import Any
from typing import Generator
from typing import List
from typing import Tuple
from typing import Type

MSG = 'TIM100 request call has no timeout'

Expand All @@ -16,7 +13,7 @@

class Visitor(ast.NodeVisitor):
def __init__(self) -> None:
self.assignments: List[Tuple[int, int]] = []
self.assignments: list[tuple[int, int]] = []

def visit_Call(self, node: ast.Call) -> None:
if (
Expand Down Expand Up @@ -67,7 +64,7 @@ class Plugin:
def __init__(self, tree: ast.AST):
self._tree = tree

def run(self) -> Generator[Tuple[int, int, str, Type[Any]], None, None]:
def run(self) -> Generator[tuple[int, int, str, type[Any]], None, None]:
visitor = Visitor()
visitor.visit(self._tree)
for line, col in visitor.assignments:
Expand Down
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ author_email = jkittner@users.noreply.github.com
license = MIT
license_files = LICENCE
classifiers =
License :: OSI Approved :: MIT License
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: Implementation :: CPython
Expand All @@ -19,7 +18,7 @@ classifiers =
py_modules = flake8_timeout
install_requires =
flake8
python_requires = >=3.8
python_requires = >=3.9

[options.packages.find]
exclude =
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py38, py39, py310, py311, pre-commit
envlist = py39, py310, py311, py312, py313, pre-commit
skip_missing_interpreters = true

[testenv]
Expand Down