Skip to content

Commit a1b8e8d

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

File tree

16 files changed

+38
-38
lines changed

16 files changed

+38
-38
lines changed

backend/config/settings/production.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@
199199
"disable_existing_loggers": True,
200200
"root": {"level": "WARNING"},
201201
"formatters": {
202-
"verbose": {"format": "%(levelname)s %(asctime)s %(module)s " "%(process)d %(thread)d %(message)s"},
202+
"verbose": {"format": "%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s"},
203203
},
204204
"handlers": {
205205
"console": {

backend/fpbase/forms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def friendly_email(self):
2929

3030
def send_email(self):
3131
EmailMessage(
32-
f'FPbase contact from {self.cleaned_data["name"]}',
32+
f"FPbase contact from {self.cleaned_data['name']}",
3333
self.cleaned_data["message"],
3434
to=[a[1] for a in settings.ADMINS],
3535
headers={"Reply-To": self.friendly_email()},

backend/fpseq/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66

77
__all__ = [
88
"FPSeq",
9-
"from_fpbase",
10-
"SkbSequence",
11-
"ParasailAlignment",
12-
"align_seqs",
139
"Mutation",
1410
"MutationSet",
11+
"ParasailAlignment",
12+
"SkbSequence",
13+
"align_seqs",
14+
"from_fpbase",
1515
"get_mutations",
1616
"mutate_sequence",
1717
"protein_weight",

backend/fpseq/skbio_protein.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def _munge_to_sequence(self, other, method):
138138
if isinstance(other, SkbSequence):
139139
if type(other) is not type(self):
140140
raise TypeError(
141-
f"Cannot use {self.__class__.__name__} and " f"{other.__class__.__name__} together with `{method}`"
141+
f"Cannot use {self.__class__.__name__} and {other.__class__.__name__} together with `{method}`"
142142
)
143143
else:
144144
return other
@@ -362,6 +362,6 @@ def _slices_from_iter(array, indexables):
362362
elif _is_single_index(i):
363363
i = _single_index_to_slice(i)
364364
else:
365-
raise IndexError("Cannot slice sequence from iterable " f"containing {i!r}.")
365+
raise IndexError(f"Cannot slice sequence from iterable containing {i!r}.")
366366

367367
yield array[i]

backend/proteins/extrest/entrez.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ def fetch_ipg_sequence(protein_name=None, uid=None):
129129
assert len(record) == 1, "More than one record returned from protein database"
130130
record = record[0]
131131
prot_seq = record["GBSeq_sequence"].upper()
132-
assert len(prot_seq) == int(
133-
seq_len
134-
), f"Protein database sequence different length {len(prot_seq)} than IPG database{int(seq_len)}"
132+
assert len(prot_seq) == int(seq_len), (
133+
f"Protein database sequence different length {len(prot_seq)} than IPG database{int(seq_len)}"
134+
)
135135
return (ipg_uid, prot_seq)
136136

137137

backend/proteins/forms/forms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ def clean(self):
390390
parent = self.cleaned_data.get("parent")
391391
mutation = self.cleaned_data.get("mutation")
392392
if (parent and not mutation) or (mutation and not parent):
393-
raise forms.ValidationError("Both parent and mutation are " "required when providing lineage information")
393+
raise forms.ValidationError("Both parent and mutation are required when providing lineage information")
394394

395395
def __init__(self, *args, **kwargs):
396396
super().__init__(*args, **kwargs)

backend/proteins/forms/microscope.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def _getpromise(fname):
205205
else:
206206
self.add_error(
207207
"optical_configs",
208-
"Filter not found in database or at Chroma/Semrock: " f"{fname}",
208+
f"Filter not found in database or at Chroma/Semrock: {fname}",
209209
)
210210
return None
211211

@@ -269,7 +269,7 @@ def lookup(fname, n=None):
269269
if len(splt) not in (4, 5):
270270
self.add_error(
271271
"optical_configs",
272-
"Lines must have 4 or 5 comma-separated fields but this one " f"has {len(splt)}: {line}",
272+
f"Lines must have 4 or 5 comma-separated fields but this one has {len(splt)}: {line}",
273273
)
274274
for n, f in enumerate(splt):
275275
if n == 0:

backend/proteins/forms/spectrum.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@ def clean(self):
111111
if not (cleaned_data.get("data") or self.files):
112112
self.add_error(
113113
"data",
114-
"Please either fill in the data field or " "select a file to upload.",
114+
"Please either fill in the data field or select a file to upload.",
115115
)
116116
self.add_error(
117117
"file",
118-
"Please either fill in the data field or " "select a file to upload.",
118+
"Please either fill in the data field or select a file to upload.",
119119
)
120120

121121
def save(self, commit=True):

backend/proteins/models/__init__.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,23 +12,23 @@
1212
from .transition import StateTransition
1313

1414
__all__ = [
15-
"Protein",
16-
"Organism",
1715
"BleachMeasurement",
18-
"OSERMeasurement",
19-
"State",
16+
"Camera",
2017
"Dye",
18+
"Excerpt",
19+
"Filter",
20+
"FilterPlacement",
2121
"Fluorophore",
22-
"StateTransition",
23-
"ProteinCollection",
24-
"Spectrum",
25-
"Camera",
2622
"Light",
27-
"Filter",
23+
"Lineage",
2824
"Microscope",
29-
"OpticalConfig",
30-
"FilterPlacement",
31-
"Excerpt",
25+
"OSERMeasurement",
3226
"OcFluorEff",
33-
"Lineage",
27+
"OpticalConfig",
28+
"Organism",
29+
"Protein",
30+
"ProteinCollection",
31+
"Spectrum",
32+
"State",
33+
"StateTransition",
3434
]

backend/proteins/models/collection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class ProteinCollection(OwnedCollection):
4141
private = models.BooleanField(
4242
default=False,
4343
verbose_name="Private Collection",
44-
help_text="Private collections can not be seen " "by or shared with other users",
44+
help_text="Private collections can not be seen by or shared with other users",
4545
)
4646

4747
def get_absolute_url(self):

0 commit comments

Comments
 (0)