Skip to content
Open
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
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: monthly
groups:
actions:
patterns:
- "*"
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
tox-job: [doc, pep8]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- uses: actions/setup-python@v5
with:
python-version: 3.x
Expand Down Expand Up @@ -44,7 +44,7 @@ jobs:
build: 'free-threading'

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
Copy link
Member

@vstinner vstinner Jan 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should write a separated PR for these changes and the .github/dependabot.yml change.

- name: Setup Python
uses: actions/setup-python@v5
if: ${{ matrix.build != 'free-threading' }}
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Lint

on: [push, pull_request, workflow_dispatch]

permissions: {}

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: tox-dev/action-pre-commit-uv@v1
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
id-token: write

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v5
with:
Expand Down
10 changes: 10 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.10
hooks:
- id: ruff-check
name: Run Ruff (lint)
args: [--exit-non-zero-on-fix]
- id: ruff-format
name: Run Ruff (format)
args: [--exit-non-zero-on-fix]
18 changes: 11 additions & 7 deletions pyperf/__init__.py
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
from time import perf_counter

VERSION = (2, 9, 0)
__version__ = '.'.join(map(str, VERSION))
__version__ = ".".join(map(str, VERSION))

# Export pyperf.perf_counter for backward compatibility with pyperf 1.7
# which supports Python 2 and Python 3
__all__ = ['perf_counter']
__all__ = ["perf_counter"]

from pyperf._utils import python_implementation, python_has_jit # noqa
__all__.extend(('python_implementation', 'python_has_jit'))

__all__.extend(("python_implementation", "python_has_jit"))

from pyperf._metadata import format_metadata # noqa
__all__.append('format_metadata')

__all__.append("format_metadata")

from pyperf._bench import Run, Benchmark, BenchmarkSuite, add_runs # noqa
__all__.extend(('Run', 'Benchmark', 'BenchmarkSuite', 'add_runs'))

from pyperf._runner import Runner # noqa
__all__.append('Runner')
__all__.extend(("Run", "Benchmark", "BenchmarkSuite", "add_runs"))

from pyperf._runner import Runner # noqa

__all__.append("Runner")
Loading