Skip to content

Commit 1c10c40

Browse files
committed
#20 - fix flake8 linting formating
1 parent 954c797 commit 1c10c40

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

src/dwcahandler/dwca/dwca_factory.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def get_contents_from_file_names(files: list) -> (dict[MetaElementTypes, str], d
3737
def derive_type(file_list: list) -> dict[str, MetaElementTypes]:
3838
file_types = {}
3939
for file in file_list:
40-
if (filename:=Path(file).stem.upper()) in dict(MetaElementTypes.__members__.items()).keys():
40+
if (filename := Path(file).stem.upper()) in dict(MetaElementTypes.__members__.items()).keys():
4141
file_types[file] = dict(MetaElementTypes.__members__.items())[filename]
4242
return file_types
4343

@@ -122,7 +122,7 @@ def create_dwca_from_zip_content(zip_file: str, output_dwca: Union[str, BytesIO]
122122
keys=get_keys(type=ext_type,
123123
override_content_keys=content_keys)))
124124
DwcaHandler.create_dwca(core_csv=core_content, ext_csv_list=ext_content, output_dwca=output_dwca,
125-
eml_content=eml_content)
125+
eml_content=eml_content)
126126
else:
127127
raise ValueError("The core content cannot be determined. Please check filename in zip file")
128128

tests/test_merge_dwca.py

-1
Original file line numberDiff line numberDiff line change
@@ -421,4 +421,3 @@ def test_merge_core_and_ext_records_with_ext_sync(self):
421421
pd.testing.assert_frame_equal(multimedia_df_output, expected_multimedia_df)
422422

423423
zf.close()
424-

tests/test_multimedia_content.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def test_fill_multimedia_info_with_format_type_partially_supplied(self, mock_mim
150150
# Extract multimedia ext without format
151151
dwca.extract_csv_content(csv_info=ContentData(data=pd.DataFrame(data=image_data,
152152
columns=["occurrenceID", "identifier",
153-
"format", "type"]),
153+
"format", "type"]),
154154
type=MetaElementTypes.MULTIMEDIA),
155155
core_ext_type=CoreOrExtType.EXTENSION)
156156

@@ -207,7 +207,7 @@ def test_fill_multimedia_info_type_from_format(self, mock_mime_types):
207207
# Extract multimedia ext without format
208208
dwca.extract_csv_content(csv_info=ContentData(data=pd.DataFrame(data=image_data,
209209
columns=["occurrenceID", "identifier",
210-
"format"]),
210+
"format"]),
211211
type=MetaElementTypes.MULTIMEDIA),
212212
core_ext_type=CoreOrExtType.EXTENSION)
213213

0 commit comments

Comments
 (0)