Skip to content

Commit 1d18548

Browse files
committed
switch to module-imports-only / drop if __name == __main__
1 parent a5e1db2 commit 1d18548

File tree

159 files changed

+0
-636
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+0
-636
lines changed

colrev/advisor.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -768,7 +768,3 @@ def get_sharing_instructions(self) -> dict:
768768
]
769769
)
770770
return {"msg": msgs, "status": status_code}
771-
772-
773-
if __name__ == "__main__":
774-
pass

colrev/checker.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,3 @@ def check_repo(self) -> dict:
766766
if failure_items:
767767
return {"status": ExitCodes.FAIL, "msg": " " + "\n ".join(failure_items)}
768768
return {"status": ExitCodes.SUCCESS, "msg": "Everything ok."}
769-
770-
771-
if __name__ == "__main__":
772-
pass

colrev/dataset.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,7 +1144,3 @@ def get_remote_url(self) -> str: # pragma: no cover
11441144
if remote.name == "origin":
11451145
remote_url = remote.url
11461146
return remote_url
1147-
1148-
1149-
if __name__ == "__main__":
1150-
pass

colrev/env/environment_manager.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,3 @@ def update_registry(self, key: str, value: str) -> None:
388388
self.environment_registry = self.load_environment_registry()
389389
dict_set_nested(self.environment_registry, keys, value)
390390
self.save_environment_registry(updated_registry=self.environment_registry)
391-
392-
393-
if __name__ == "__main__":
394-
pass

colrev/env/grobid_service.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,3 @@ def start(self) -> None:
6969
)
7070

7171
self.check_grobid_availability()
72-
73-
74-
if __name__ == "__main__":
75-
pass

colrev/env/language_service.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,3 @@ def unify_to_iso_639_3_language_codes(
9999
]
100100

101101
self.validate_iso_639_3_language_codes(lang_code_list=[record.data["language"]])
102-
103-
104-
if __name__ == "__main__":
105-
pass

colrev/env/local_index.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,7 +1368,3 @@ def is_duplicate(self, *, record1_colrev_id: list, record2_colrev_id: list) -> s
13681368
pass
13691369

13701370
return "unknown"
1371-
1372-
1373-
if __name__ == "__main__":
1374-
pass

colrev/env/package_manager.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -996,7 +996,3 @@ def update_package_list(self) -> None:
996996
) as file:
997997
file.write(json_object)
998998
file.write("\n") # to avoid pre-commit/eof-fix changes
999-
1000-
1001-
if __name__ == "__main__":
1002-
pass

colrev/env/resources.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,3 @@ def install_curated_resource(self, *, curated_resource: str) -> bool:
5656
f"Error: repo does not contain a data/records.bib/linked repos {repo_dir}"
5757
)
5858
return True
59-
60-
61-
if __name__ == "__main__":
62-
pass

colrev/env/screenshot_service.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,3 @@ def add_screenshot(
127127
)
128128

129129
return record
130-
131-
132-
if __name__ == "__main__":
133-
pass

0 commit comments

Comments
 (0)