Skip to content

Commit

Permalink
chore: [pre-commit.ci] pre-commit autoupdate (#141)
Browse files Browse the repository at this point in the history
* chore: [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v4.5.0](pre-commit/pre-commit-hooks@v4.4.0...v4.5.0)
- [github.com/psf/black-pre-commit-mirror: 23.3.0 → 24.1.1](psf/black-pre-commit-mirror@23.3.0...24.1.1)
- [github.com/asottile/setup-cfg-fmt: v2.3.0 → v2.5.0](asottile/setup-cfg-fmt@v2.3.0...v2.5.0)
- [github.com/pre-commit/mirrors-mypy: v1.3.0 → v1.8.0](pre-commit/mirrors-mypy@v1.3.0...v1.8.0)
- [github.com/astral-sh/ruff-pre-commit: v0.0.270 → v0.2.0](astral-sh/ruff-pre-commit@v0.0.270...v0.2.0)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jim Pivarski <[email protected]>
  • Loading branch information
pre-commit-ci[bot] and jpivarski authored Mar 21, 2024
1 parent 48f4681 commit 0fd45be
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 15 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand All @@ -18,18 +18,18 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.3.0
rev: 24.1.1
hooks:
- id: black

- repo: https://github.com/asottile/setup-cfg-fmt
rev: v2.3.0
rev: v2.5.0
hooks:
- id: setup-cfg-fmt
args: [--include-version-classifiers, --max-py-version=3.11]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.3.0
rev: v1.8.0
hooks:
# 3.9 is broken due to https://github.com/python/typeshed/pull/5216 and https://github.com/python/typeshed/pull/5214
- id: mypy
Expand All @@ -41,7 +41,7 @@ repos:
- types-requests

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.0.270"
rev: "v0.2.0"
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
1 change: 1 addition & 0 deletions dev/make-root/uproot-issue38c.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""
This example will produce a ROOT file with a TEfficiency with fBeta_bin_params filled.
"""

from __future__ import annotations

import ROOT
Expand Down
14 changes: 7 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ write_to = "src/skhep_testdata/version.py"


[tool.ruff]
select = [
lint.select = [
"E", "F", "W", # flake8
"B", # flake8-bugbear
"I", # isort
Expand All @@ -34,21 +34,21 @@ select = [
"NPY", # NumPy specific rules
"PD", # pandas-vet
]
extend-ignore = [
lint.extend-ignore = [
"PLR", # Design related pylint codes
"E501", # Line too long
"PT011", # Too broad of a match
]
target-version = "py37"
typing-modules = ["mypackage._compat.typing"]
lint.typing-modules = ["mypackage._compat.typing"]
src = ["src"]
unfixable = [
lint.unfixable = [
"T20", # Removes print statements
"F841", # Removes unused variables
]
flake8-unused-arguments.ignore-variadic-names = true
isort.required-imports = ["from __future__ import annotations"]
lint.flake8-unused-arguments.ignore-variadic-names = true
lint.isort.required-imports = ["from __future__ import annotations"]

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["T20", "ARG001"]
"__main__.py" = ["T20"]
3 changes: 1 addition & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ classifiers =
Natural Language :: English
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Expand All @@ -35,7 +34,7 @@ install_requires =
pyyaml
requests
importlib-resources>=1.3;python_version<"3.9"
python_requires = >=3.7
python_requires = >=3.8
package_dir =
=src
zip_safe = True
Expand Down
1 change: 1 addition & 0 deletions src/skhep_testdata/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
python -m skhep_testdata cms_hep_2012_tutorial/data.root
```
"""

from __future__ import annotations

import argparse
Expand Down
3 changes: 2 additions & 1 deletion src/skhep_testdata/remote_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import os
import sys
import tarfile
from typing import ClassVar
from urllib.request import urlretrieve

import yaml
Expand All @@ -18,7 +19,7 @@


class RemoteDatasetList:
_all_files: dict[str, dict[str, str]] = {}
_all_files: ClassVar[dict[str, dict[str, str]]] = {}

@classmethod
def get_config_for_file(cls, filename: str) -> dict[str, str]:
Expand Down

0 comments on commit 0fd45be

Please sign in to comment.