Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

check-thirdparty: Work around deficient Mypy annotations for debian.

Anders Kaseorg3e8e4b9cadc9
diff --git a/tools/check-thirdparty b/tools/check-thirdparty
index fc0f0b01751..4cd1060fcc6 100755
--- a/tools/check-thirdparty
+++ b/tools/check-thirdparty
@@ -36,7 +36,9 @@ if not c.header.known_format():
status = 1
defined_licenses = {
- p.license.synopsis for p in c.all_license_paragraphs() if p.license.text
+ p.license.to_str().split("\n", 1)[0]
+ for p in c.all_license_paragraphs()
+ if "\n" in p.license.to_str()
}
for p in c.all_files_paragraphs():
@@ -45,8 +47,8 @@ for p in c.all_files_paragraphs():
print(f"{COPYRIGHT_FILENAME}: No such file {g}")
status = 1
- if not p.license.text and p.license.synopsis not in defined_licenses:
- print(f"{COPYRIGHT_FILENAME}: Missing license text for {p.license.synopsis}")
+ if "\n" not in p.license.to_str() and p.license.to_str() not in defined_licenses:
+ print(f"{COPYRIGHT_FILENAME}: Missing license text for {p.license.to_str()}")
status = 1
dumped = c.dump()