Skip to content

Commit 419086b

Browse files
committed
linters
1 parent 61ca62f commit 419086b

File tree

4 files changed

+12
-15
lines changed

4 files changed

+12
-15
lines changed

src/aind_data_schema/data_description.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class DataRegex(Enum):
3636
f"{RegexParts.DATE.value})_(?P<c_time>{RegexParts.TIME.value})$"
3737
)
3838
NO_UNDERSCORES = "^[^_]+$"
39-
NO_SPECIAL_CHARS = '^[^<>:;"/|? _\\]+$'
39+
NO_SPECIAL_CHARS = "^[^<>:;\"/|? \\_]+$"
4040

4141

4242
class DataLevel(Enum):

src/aind_data_schema/imaging/mri_session.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def validate_other(cls, v):
9090
if v.get("scan_sequence_type") == MriScanSequence.OTHER and not v.get("notes"):
9191
raise ValueError(
9292
"Notes cannot be empty if scan_sequence_type is Other.",
93-
"Describe the scan_sequence_type in the notes field."
93+
"Describe the scan_sequence_type in the notes field.",
9494
)
9595
return v
9696

tests/test_data_description.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88
from typing import List
99

1010
from aind_data_schema.data_description import (
11+
AnalysisDescription,
1112
DataDescription,
1213
DerivedDataDescription,
1314
Funding,
1415
Institution,
1516
Modality,
1617
Platform,
1718
RawDataDescription,
18-
AnalysisDescription
1919
)
2020
from aind_data_schema.schema_upgrade.data_description_upgrade import DataDescriptionUpgrade
2121

@@ -123,8 +123,8 @@ def test_constructors(self):
123123
)
124124

125125
AnalysisDescription(
126-
analysis_name='analysis',
127-
project_name='project',
126+
analysis_name="analysis",
127+
project_name="project",
128128
creation_time=dt,
129129
subject_id="1234",
130130
modality=[Modality.SPIM],
@@ -136,8 +136,8 @@ def test_constructors(self):
136136

137137
with self.assertRaises(ValueError):
138138
AnalysisDescription(
139-
analysis_name='ana lysis',
140-
project_name='pro_ject',
139+
analysis_name="ana lysis",
140+
project_name="pro_ject",
141141
subject_id="1234",
142142
modality=[Modality.SPIM],
143143
platform="exaspim",
@@ -149,8 +149,8 @@ def test_constructors(self):
149149

150150
with self.assertRaises(ValueError):
151151
AnalysisDescription(
152-
analysis_name='',
153-
project_name='project',
152+
analysis_name="",
153+
project_name="project",
154154
subject_id="1234",
155155
modality=[Modality.SPIM],
156156
platform="exaspim",
@@ -162,8 +162,8 @@ def test_constructors(self):
162162

163163
with self.assertRaises(ValueError):
164164
AnalysisDescription(
165-
analysis_name='analysis',
166-
project_name='',
165+
analysis_name="analysis",
166+
project_name="",
167167
subject_id="1234",
168168
modality=[Modality.SPIM],
169169
platform="exaspim",

tests/test_processing.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ def test_constructors(self):
2222
)
2323

2424
with self.assertRaises(pydantic.ValidationError):
25-
DataProcess(
26-
name="Other",
27-
notes=""
28-
)
25+
DataProcess(name="Other", notes="")
2926

3027
assert p is not None
3128

0 commit comments

Comments
 (0)