From 82407f766046be2694adbe95b0ed39997f698598 Mon Sep 17 00:00:00 2001 From: Tristan Rice Date: Mon, 3 Apr 2023 13:40:28 -0700 Subject: [PATCH] LICENSE: added additional copyright holders + removed copyright lint (#721) --- LICENSE | 9 +++++++++ scripts/copyright.py | 48 -------------------------------------------- scripts/lint.sh | 1 - 3 files changed, 9 insertions(+), 49 deletions(-) delete mode 100755 scripts/copyright.py diff --git a/LICENSE b/LICENSE index 42d4de6be..faa156a68 100644 --- a/LICENSE +++ b/LICENSE @@ -1,8 +1,17 @@ BSD 3-Clause License +All contributions by Meta: Copyright (c) Meta Platforms, Inc. and affiliates. All rights reserved. +All contributions by Kiuk Chung: +Copyright (c) Kiuk Chung +All rights reserved. + +All contributions by Tristan Rice: +Copyright (c) Tristan Rice +All rights reserved. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/scripts/copyright.py b/scripts/copyright.py deleted file mode 100755 index cbd05896d..000000000 --- a/scripts/copyright.py +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env python3 -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. - -import sys -from typing import List - - -COPYRIGHT_NOTICE: str = """ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# All rights reserved. -# -# This source code is licensed under the BSD-style license found in the -# LICENSE file in the root directory of this source tree. -""".strip() - - -def main(files: List[str]) -> None: - missing = [] - for path in files: - with open(path, "rt") as f: - data = f.read() - - data = data.strip() - # don't lint empty files - if len(data) == 0: - continue - - # skip the interpreter command and formatting - while data.startswith("#!") or data.startswith("# -*-"): - data = data[data.index("\n") + 1 :] - - if not data.startswith(COPYRIGHT_NOTICE): - missing.append(path) - - if len(missing) > 0: - print(f"{COPYRIGHT_NOTICE}\n") - print("Please add the copyright notice to all listed files:\n") - for path in missing: - print(path) - sys.exit(1) - - -if __name__ == "__main__": - main(sys.argv[1:]) diff --git a/scripts/lint.sh b/scripts/lint.sh index 65c86b573..8f60a23fb 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -58,7 +58,6 @@ then usort format "$file" black "$file" -q flake8 "$file" || LINT_ERRORS=1 - scripts/copyright.py "$file" || LINT_ERRORS=1 done else echo "No changes made to any Python files. Nothing to do."