Skip to content

Commit

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

updates:
- [github.com/psf/black: 23.1.0 → 23.3.0](psf/black@23.1.0...23.3.0)
- [github.com/charliermarsh/ruff-pre-commit: v0.0.257 → v0.0.260](astral-sh/ruff-pre-commit@v0.0.257...v0.0.260)

* Explained why we have B018 and F401.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Jim Pivarski <jpivarski@gmail.com>
Co-authored-by: Jim Pivarski <jpivarski@users.noreply.github.com>
  • Loading branch information
3 people authored Apr 6, 2023
1 parent 0ffdbcd commit ed1d81f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/psf/black
rev: 23.1.0
rev: 23.3.0
hooks:
- id: black

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.257"
rev: "v0.0.260"
hooks:
- id: ruff
args: ["--fix", "--show-fixes"]
2 changes: 1 addition & 1 deletion dev/make-models.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@


with uproot.open("example-objects.root") as f:
f.file.streamers
f.file.streamers # noqa: B018 (this is not a useless expression; it runs code)

for classname, class_version in superclasses:
cls = f.file.class_named(classname, class_version)
Expand Down
4 changes: 2 additions & 2 deletions src/uproot/extras.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def lz4_block():
"""
try:
import lz4.block
import xxhash
import xxhash # noqa: F401
except ModuleNotFoundError as err:
raise ModuleNotFoundError(
"""install the 'lz4' and `xxhash` packages with:
Expand All @@ -185,7 +185,7 @@ def xxhash():
Attempts to import ``lz4`` as well.
"""
try:
import lz4.block
import lz4.block # noqa: F401
import xxhash
except ModuleNotFoundError as err:
raise ModuleNotFoundError(
Expand Down
2 changes: 1 addition & 1 deletion src/uproot/reading.py
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,7 @@ def streamer_rules(self):
:ref:`uproot.reading.ReadOnlyFile.streamers`.
"""
if self._streamer_rules is None:
self.streamers
self.streamers # noqa: B018 (this is not a useless expression; it runs code)
return self._streamer_rules

def streamers_named(self, classname):
Expand Down

0 comments on commit ed1d81f

Please sign in to comment.