Skip to content

Commit 4cfc719

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

File tree

6 files changed

+35
-27
lines changed

6 files changed

+35
-27
lines changed

cirrocumulus/concat.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,11 @@ def concat_spatial(paths: list[str], output_path: str, ncols: int = 2):
148148

149149
def create_parser(description=False):
150150
parser = argparse.ArgumentParser(
151-
description="Concatenate datasets in a grid layout. If all the datasets are spatial datasets, then tissue images are concatenated."
152-
if description
153-
else None
151+
description=(
152+
"Concatenate datasets in a grid layout. If all the datasets are spatial datasets, then tissue images are concatenated."
153+
if description
154+
else None
155+
)
154156
)
155157
parser.add_argument(
156158
"dataset",

cirrocumulus/diff_exp.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,15 @@ def __init__(
137137
scores=scores,
138138
pvals=pvals,
139139
logfoldchanges=foldchanges,
140-
frac_expressed1=frac_expressed_df.loc[group_one].values
141-
if frac_expressed_df is not None
142-
else None,
143-
frac_expressed2=frac_expressed_df.loc[group_two].values
144-
if frac_expressed_df is not None
145-
else None,
140+
frac_expressed1=(
141+
frac_expressed_df.loc[group_one].values
142+
if frac_expressed_df is not None
143+
else None
144+
),
145+
frac_expressed2=(
146+
frac_expressed_df.loc[group_two].values
147+
if frac_expressed_df is not None
148+
else None
149+
),
146150
)
147151
self.pair2results = pair2results

cirrocumulus/local_db_api.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,10 @@ def __init__(self, paths: list[str]):
5050
if url.lower().endswith(".json.gz") or url.lower().endswith(".json"):
5151
import gzip
5252

53-
with gzip.open(fs.open(url)) if url.lower().endswith(".json.gz") else fs.open(
54-
url
53+
with (
54+
gzip.open(fs.open(url))
55+
if url.lower().endswith(".json.gz")
56+
else fs.open(url)
5557
) as f:
5658
d = json.load(f)
5759
if "id" in d:

src/AutocompleteVirtualized.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ export default function AutocompleteVirtualized(props) {
262262
result.text != null
263263
? result.text
264264
: result.id != null
265-
? result.id
266-
: result;
265+
? result.id
266+
: result;
267267
textToOption.delete(text.toLowerCase());
268268
});
269269
tokens.forEach((token) => {

src/actions/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2425,8 +2425,8 @@ function getNewEmbeddingData(state, features) {
24252425
embedding.spatial != null
24262426
? embedding.spatial.type
24272427
: embedding.type
2428-
? embedding.type
2429-
: TRACE_TYPE_SCATTER;
2428+
? embedding.type
2429+
: TRACE_TYPE_SCATTER;
24302430
let coordinates =
24312431
traceType !== TRACE_TYPE_META_IMAGE ? cachedData[embeddingKey] : null;
24322432
if (coordinates == null && embedding.mode != null) {

src/util.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -680,10 +680,10 @@ export function rankdata(values) {
680680
return a.value < b.value
681681
? -1
682682
: a.value === b.value
683-
? a.position < b.position
684-
? -1
685-
: 1
686-
: 1;
683+
? a.position < b.position
684+
? -1
685+
: 1
686+
: 1;
687687
});
688688

689689
// Walk the sorted array, filling output array using sorted positions,
@@ -722,20 +722,20 @@ function indexSortPairs(ranks, ascending) {
722722
return a.value < b.value
723723
? -1
724724
: a.value === b.value
725-
? a.position < b.position
726-
? -1
727-
: 1
728-
: 1;
725+
? a.position < b.position
726+
? -1
727+
: 1
728+
: 1;
729729
});
730730
} else {
731731
ranks.sort(function (a, b) {
732732
return a.value < b.value
733733
? 1
734734
: a.value === b.value
735-
? a.position < b.position
736-
? 1
737-
: -1
738-
: -1;
735+
? a.position < b.position
736+
? 1
737+
: -1
738+
: -1;
739739
});
740740
}
741741

0 commit comments

Comments
 (0)