Skip to content

Commit 439d13f

Browse files
authored
Updated pyproject toml to reflect latest style (#6)
- Added Python 3.13 as a supported Python version - Udpated pre-commit hooks - Fixed pylint errors due to changed rules
1 parent 0fdd6ce commit 439d13f

File tree

7 files changed

+20
-18
lines changed

7 files changed

+20
-18
lines changed

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99

1010
strategy:
1111
matrix:
12-
python-version: [ "3.12" ]
12+
python-version: [ "3.13" ]
1313

1414
steps:
1515
- name: Checkout source repository

.github/workflows/publish-pypi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
strategy:
1616
matrix:
17-
python-version: [ "3.12", ]
17+
python-version: [ "3.13" ]
1818

1919
steps:
2020
- name: Checkout source repository
@@ -44,7 +44,7 @@ jobs:
4444

4545
strategy:
4646
matrix:
47-
python-version: [ "3.12" ]
47+
python-version: [ "3.13" ]
4848

4949
steps:
5050
- name: Checkout source repository

.github/workflows/publish-test-pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
strategy:
1818
matrix:
19-
python-version: [ "3.12" ]
19+
python-version: [ "3.13" ]
2020

2121
steps:
2222
- name: Checkout source repository

.github/workflows/pylint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
strategy:
1818
matrix:
19-
python-version: ["3.10", "3.11", "3.12"]
19+
python-version: [ "3.10", "3.11", "3.12", "3.13" ]
2020

2121
steps:
2222
- name: Checkout source repository

.pre-commit-config.yaml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,35 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v4.5.0
5+
rev: v6.0.0
66
hooks:
77
- id: check-executables-have-shebangs
88
# Check for invalid files
99
- id: check-toml
1010
# Check Python files
1111
- id: end-of-file-fixer
12-
- id: fix-encoding-pragma
13-
args: [--remove]
12+
exclude: "^.*\\.bin$"
1413
- id: mixed-line-ending
1514
args: [ --fix=lf ]
1615
- id: check-executables-have-shebangs
1716
- id: requirements-txt-fixer
1817
- id: trailing-whitespace
1918
args: [ --markdown-linebreak-ext=md ]
19+
- repo: https://github.com/asottile/pyupgrade
20+
rev: v3.20.0
21+
hooks:
22+
- id: pyupgrade
2023
- repo: https://github.com/psf/black
21-
rev: 24.4.2
24+
rev: 25.1.0
2225
hooks:
2326
- id: black
2427
- repo: https://github.com/asottile/blacken-docs
25-
rev: 1.16.0
28+
rev: 1.19.1
2629
hooks:
2730
- id: blacken-docs
2831
args: [ --line-length=120 ]
2932
- repo: https://github.com/PyCQA/isort
30-
rev: 5.13.2
33+
rev: 6.0.1
3134
hooks:
3235
- id: isort
3336
- repo: local
@@ -39,6 +42,6 @@ repos:
3942
types: [ python ]
4043
require_serial: true
4144
- repo: https://github.com/pre-commit/mirrors-mypy
42-
rev: 'v1.10.0'
45+
rev: 'v1.17.1'
4346
hooks:
4447
- id: mypy

async_gpib/async_gpib.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# Import either the Linux GPIB module or gpib_ctypes. Prefer Linux GPIB.
1212
from enum import Flag, unique
1313
from types import TracebackType
14-
from typing import Any, Callable, Type
14+
from typing import Any, Callable
1515

1616
try:
1717
from typing import Self # type: ignore # Python 3.11
@@ -105,7 +105,7 @@ def sad(self) -> int:
105105
def __str__(self) -> str:
106106
return f"Linux-GPIB at Gpib({self.__name})"
107107

108-
def __init__( # pylint: disable=too-many-arguments
108+
def __init__( # pylint: disable=too-many-arguments,too-many-positional-arguments
109109
self,
110110
name: int | str = "gpib0",
111111
pad: int | None = None,
@@ -150,7 +150,7 @@ async def __aenter__(self) -> Self:
150150
return self
151151

152152
async def __aexit__(
153-
self, exc_type: Type[BaseException] | None, exc: BaseException | None, traceback: TracebackType | None
153+
self, exc_type: type[BaseException] | None, exc: BaseException | None, traceback: TracebackType | None
154154
) -> None:
155155
await self.disconnect()
156156

pyproject.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,16 @@ authors = [
55
]
66
description = "Python3 AsyncIO Linux GPIB wrapper"
77
readme = "README.md"
8-
license = { text="GNU General Public License v3 (GPLv3)" }
8+
license = "GPL-3.0-only"
99
requires-python = ">=3.7"
1010
classifiers = [
1111
"Programming Language :: Python :: 3",
12-
"Programming Language :: Python :: 3.8",
1312
"Programming Language :: Python :: 3.9",
1413
"Programming Language :: Python :: 3.10",
1514
"Programming Language :: Python :: 3.11",
1615
"Programming Language :: Python :: 3.12",
16+
"Programming Language :: Python :: 3.13",
1717
"Development Status :: 5 - Production/Stable",
18-
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
1918
"Operating System :: OS Independent",
2019
"Intended Audience :: Developers",
2120
"Intended Audience :: Science/Research",

0 commit comments

Comments
 (0)