Skip to content

Commit f5c48de

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 872efbc commit f5c48de

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

did_finder_atlasopenmagic/src/did_finder_atlasopenmagic/celery.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,36 +71,30 @@ def find_files(
7171

7272
match did_name.split("/"):
7373
case [release, did]:
74-
skim = 'noskim'
74+
skim = "noskim"
7575
case [release, did, skim]:
7676
pass
7777

7878
try:
7979
atom.set_release(release)
8080
except ValueError as e:
81-
raise NoSuchDatasetException(
82-
f"Invalid release. Error: {e}"
83-
)
81+
raise NoSuchDatasetException(f"Invalid release. Error: {e}")
8482

8583
if did not in atom.available_datasets():
8684
raise NoSuchDatasetException(
8785
f"Dataset ID {did} not found for release {release}"
8886
)
8987

9088
if skim != "noskim" and skim not in atom.available_skims():
91-
raise NoSuchDatasetException(
92-
f"Skim {skim} not found for release {release}"
93-
)
89+
raise NoSuchDatasetException(f"Skim {skim} not found for release {release}")
9490

9591
try:
9692
for url in atom.get_urls(key=did, skim=skim, protocol="root"):
9793
yield {
9894
"paths": [url],
9995
"adler32": 0, # No clue
10096
"file_size": 0, # Size in bytes if known
101-
"file_events": 0 # Number of events if known
97+
"file_events": 0, # Number of events if known
10298
}
10399
except Exception as e:
104-
raise LookupFailureException(
105-
f"Lookup failure: {e}"
106-
)
100+
raise LookupFailureException(f"Lookup failure: {e}")

did_finder_atlasopenmagic/tests/did_finder_atlasopenmagic_tests/test_servicex_did_finder_atlasopenmagic.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@
3838

3939

4040
def test_working_call():
41-
for did, nfiles in [("2024r-pp/700901", 11),
42-
("2020e-13tev/data/3lep", 4)
43-
]:
41+
for did, nfiles in [("2024r-pp/700901", 11), ("2020e-13tev/data/3lep", 4)]:
4442
iter = find_files(did, {"request-id": "112233"})
4543
files = [f for f in iter]
4644
assert len(files) == nfiles

0 commit comments

Comments
 (0)