Skip to content

Commit

Permalink
Merge pull request #841 from CoffeaTeam/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
build(pre-commit.ci): pre-commit autoupdate
  • Loading branch information
lgray committed Jun 20, 2023
2 parents 0a6a961 + fd63449 commit 8f7da33
Show file tree
Hide file tree
Showing 2 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 @@ -37,7 +37,7 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/asottile/pyupgrade
rev: v3.6.0
rev: v3.7.0
hooks:
- id: pyupgrade
args: ["--py36-plus"]
Expand All @@ -54,7 +54,7 @@ repos:
exclude: coffea/processor/templates

- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
rev: v2.2.5
hooks:
- id: codespell
args: ["--skip=*.ipynb","-L hist,Hist,nd,SubJet,subjet,Subjet,PTD,ptd,fPt,fpt"]
8 changes: 4 additions & 4 deletions src/coffea/processor/parsl/detail.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ def derive_chunks(filename, treename, chunksize, ds, timeout=10):

uproot.XRootDSource.defaults["parallel"] = False

afile = uproot.open({filename: None})
a_file = uproot.open({filename: None})

tree = None
if isinstance(treename, str):
tree = afile[treename]
tree = a_file[treename]
elif isinstance(treename, Sequence):
for name in reversed(treename):
if name in afile:
tree = afile[name]
if name in a_file:
tree = a_file[name]
else:
raise Exception(
"treename must be a str or Sequence but is a %s!" % repr(type(treename))
Expand Down

0 comments on commit 8f7da33

Please sign in to comment.