Skip to content

Commit

Permalink
Merge pull request #135 from ESSS/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
nicoddemus authored Aug 6, 2024
2 parents 0f0fb23 + b441fa7 commit b01875e
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 40 deletions.
21 changes: 3 additions & 18 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,8 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: [3.7, 3.8, 3.9]
python-version: ["3.10", "3.11", "3.12"]
os: [ubuntu-latest, windows-latest]
include:
# non-matrix listed runs (python 3.6 is not supported with ubuntu-latest).
- python-version: 3.6
os: ubuntu-20.04
env: "py36"
- python-version: 3.6
os: windows-latest
env: "py36"
# "env" for matrix listed python runs.
- python-version: 3.7
env: "py37"
- python-version: 3.8
env: "py38"
- python-version: 3.9
env: "py39"

steps:
- uses: actions/checkout@v2
Expand All @@ -52,7 +37,7 @@ jobs:
- name: Run tests
run: |
tox -e ${{matrix.env}}
tox -e py
codecov -t ${{secrets.CODECOV_TOKEN}} -X gcov -f coverage.xml
deploy:
Expand All @@ -68,7 +53,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.7"
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
exclude: 'test_hookman_generator/*'
exclude: 'test_hookman_generator/.*'
repos:
- repo: https://github.com/psf/black
rev: 24.4.2
rev: 24.8.0
hooks:
- id: black
args: [--safe, --quiet]
Expand All @@ -16,7 +16,7 @@ repos:
rev: v3.13.0
hooks:
- id: reorder-python-imports
args: ['--application-directories=.:src', --py36-plus]
args: ['--application-directories=.:src', --py310-plus]
- repo: local
hooks:
- id: rst
Expand Down
5 changes: 5 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
History
=======

UNRELEASED
==========

- Dropped support for old Python versions, requiring Python 3.10+.

0.5.0 (2023-02-10)
==================

Expand Down
2 changes: 1 addition & 1 deletion hookman/hookman_utils.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import ctypes
import os
import sys
from collections.abc import Sequence
from contextlib import contextmanager
from pathlib import Path
from typing import List
from typing import Sequence
from typing import Union


Expand Down
4 changes: 2 additions & 2 deletions hookman/hooks.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import inspect
import shutil
from collections.abc import Callable
from collections.abc import Sequence
from pathlib import Path
from typing import Callable
from typing import List
from typing import Optional
from typing import Sequence
from zipfile import ZipFile

from hookman import hookman_utils
Expand Down
14 changes: 5 additions & 9 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The setup script."""
from setuptools import find_packages
from setuptools import setup

Expand All @@ -20,8 +17,9 @@
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
],
description="HookMan is a python package that provides a plugin management system to applications, specially those who are written (in totally or partially) in C++.",
entry_points={"console_scripts": ["hookman=hookman.__main__:cli"]},
Expand All @@ -33,12 +31,10 @@
include_package_data=True,
keywords="hookman",
name="python-hookman",
python_requires=">=3.10",
packages=find_packages(include=["hookman"]),
url="https://github.com/esss/hookman",
use_scm_version=True,
setup_requires=[
"setuptools_scm<7.0; python_version<'3.7'",
"setuptools_scm; python_version>='3.7'",
],
setup_requires=["setuptools_scm"],
zip_safe=False,
)
8 changes: 5 additions & 3 deletions tests/test_hookman_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,10 @@ def test_generate_plugin_package_invalid_shared_lib_name(acme_hook_specs_file, t
)


@pytest.mark.parametrize('package_name_extra', [None, 'foo'])
def test_generate_plugin_package(acme_hook_specs_file, tmpdir, mock_plugin_id_from_dll, package_name_extra):
@pytest.mark.parametrize("package_name_extra", [None, "foo"])
def test_generate_plugin_package(
acme_hook_specs_file, tmpdir, mock_plugin_id_from_dll, package_name_extra
):
hg = HookManGenerator(hook_spec_file_path=acme_hook_specs_file)
plugin_id = "acme"
hg.generate_plugin_template(
Expand Down Expand Up @@ -299,7 +301,7 @@ def test_generate_plugin_package_with_missing_folders(acme_hook_specs_file, tmpd

# -- Without a shared library binary
shared_lib_extension = "*.dll" if sys.platform == "win32" else "*.so"
string_to_match = fr"Unable to locate a shared library ({shared_lib_extension}) in"
string_to_match = rf"Unable to locate a shared library ({shared_lib_extension}) in"
import re

with pytest.raises(FileNotFoundError, match=re.escape(string_to_match)):
Expand Down
7 changes: 3 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
[tox]
envlist = py36
py37
py38
py39
envlist = 310
311
312
linting
docs

Expand Down

0 comments on commit b01875e

Please sign in to comment.