mirror of
https://github.com/XuehaiPan/nvitop.git
synced 2026-05-15 14:15:55 -06:00
chore(pre-commit): update pre-commit hooks
This commit is contained in:
parent
14b15ea0a1
commit
57b48e6a3a
2 changed files with 21 additions and 22 deletions
|
|
@ -27,16 +27,25 @@ repos:
|
|||
- id: debug-statements
|
||||
- id: double-quote-string-fixer
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.11.4
|
||||
rev: v0.11.6
|
||||
hooks:
|
||||
- id: ruff
|
||||
args: [--fix, --exit-non-zero-on-fix]
|
||||
- id: ruff-format
|
||||
args: [--exit-non-zero-on-format]
|
||||
- repo: https://github.com/codespell-project/codespell
|
||||
rev: v2.4.1
|
||||
hooks:
|
||||
- id: codespell
|
||||
additional_dependencies: [".[toml]"]
|
||||
- repo: https://github.com/pre-commit/mirrors-mypy
|
||||
rev: v1.15.0
|
||||
hooks:
|
||||
- id: mypy
|
||||
exclude: |
|
||||
(?x)(
|
||||
^nvitop-exporter/setup.py$
|
||||
)
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: pylint
|
||||
|
|
@ -45,15 +54,3 @@ repos:
|
|||
language: system
|
||||
types: [python]
|
||||
require_serial: true
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: mypy
|
||||
name: mypy
|
||||
entry: mypy
|
||||
language: system
|
||||
types_or: [python, pyi]
|
||||
require_serial: true
|
||||
exclude: |
|
||||
(?x)(
|
||||
^nvitop-exporter/setup.py$
|
||||
)
|
||||
|
|
|
|||
|
|
@ -9,12 +9,13 @@ import re
|
|||
import sys
|
||||
from importlib.util import module_from_spec, spec_from_file_location
|
||||
from pathlib import Path
|
||||
from typing import TYPE_CHECKING, Generator
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from setuptools import setup
|
||||
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from collections.abc import Generator
|
||||
from types import ModuleType
|
||||
|
||||
|
||||
|
|
@ -61,11 +62,12 @@ def vcs_version(name: str, path: Path | str) -> Generator[ModuleType]:
|
|||
file.write(content)
|
||||
|
||||
|
||||
with vcs_version(
|
||||
name='nvitop_exporter.version',
|
||||
path=(HERE / 'nvitop_exporter' / 'version.py'),
|
||||
) as version:
|
||||
setup(
|
||||
name='nvitop-exporter',
|
||||
version=version.__version__,
|
||||
)
|
||||
if __name__ == '__main__':
|
||||
with vcs_version(
|
||||
name='nvitop_exporter.version',
|
||||
path=(HERE / 'nvitop_exporter' / 'version.py'),
|
||||
) as version:
|
||||
setup(
|
||||
name='nvitop-exporter',
|
||||
version=version.__version__,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue