Skip to content

Commit

Permalink
chore: update pre-commit hooks (#1240)
Browse files Browse the repository at this point in the history
* chore: update pre-commit hooks

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.4.10 → v0.5.0](astral-sh/ruff-pre-commit@v0.4.10...v0.5.0)

* style: pre-commit fixes

* turn off the new checks

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: jpivarski <[email protected]>
Co-authored-by: Jim Pivarski <[email protected]>
  • Loading branch information
3 people authored Jul 7, 2024
1 parent aaf2396 commit 599984e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ repos:
- id: black

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.10
rev: v0.5.0
hooks:
- id: ruff
args: [--fix, --show-fixes]
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ ignore = [
"SIM114", # combine `if` branches using logical `or` operator
"S307", # no eval allowed
"PLC1901", # empty string is falsey (but I don't want to rely on such weak typing)
"RUF012" # enforces type annotations on a codebase that lacks type annotations
"RUF012", # enforces type annotations on a codebase that lacks type annotations
"SIM103" # interferes with my if-elif-elif-else blocks
]
select = [
"E",
Expand Down
10 changes: 5 additions & 5 deletions src/uproot/interpretation/library.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def __repr__(self):
return repr(self.name)

def __eq__(self, other):
return type(_libraries[self.name]) is type(_libraries[other.name]) # noqa: E721
return type(_libraries[self.name]) is type(_libraries[other.name])


class NumPy(Library):
Expand Down Expand Up @@ -751,14 +751,14 @@ def concatenate(self, all_arrays):
def _is_pandas_rangeindex(pandas, index):
if hasattr(pandas, "RangeIndex") and isinstance(index, pandas.RangeIndex):
return True
if hasattr(index, "is_integer") and index.is_integer():
elif hasattr(index, "is_integer") and index.is_integer():
return True
if uproot._util.parse_version(pandas.__version__) < uproot._util.parse_version(
elif uproot._util.parse_version(pandas.__version__) < uproot._util.parse_version(
"1.4.0"
) and isinstance(index, pandas.Int64Index):
return True

return False
else:
return False


def _strided_to_pandas(path, interpretation, data, arrays, columns):
Expand Down
2 changes: 1 addition & 1 deletion src/uproot/interpretation/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ def basket_array_forth(
options,
):
awkward = uproot.extras.awkward()
import awkward.forth
import awkward.forth # noqa: F811

self.hook_before_basket_array(
data=data,
Expand Down

0 comments on commit 599984e

Please sign in to comment.