Skip to content

Commit 5b0c0ee

Browse files
committed
Address relicensing review feedback
Signed-off-by: Keith Kraus <keith.j.kraus@gmail.com>
1 parent 46827f0 commit 5b0c0ee

3 files changed

Lines changed: 0 additions & 64 deletions

File tree

.pre-commit-config.yaml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,6 @@ repos:
3535
exclude: '(.*pixi\.lock)|(\.git_archival\.txt)|(.*\.patch$)|(^cuda_core/cuda/core/_vendored/)'
3636
args: ["--fix"]
3737

38-
- id: check-license-copies
39-
name: Check Package License Copies
40-
entry: python ./toolshed/sync_licenses.py
41-
language: system
42-
pass_filenames: false
43-
always_run: true
44-
4538
- id: no-markdown-in-docs-source
4639
name: Prevent markdown files in docs/source directories
4740
entry: bash -c

toolshed/check_spdx.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
import datetime
5-
import fnmatch
65
import os
76
import re
87
import subprocess
@@ -36,8 +35,6 @@
3635
"toolshed": "Apache-2.0",
3736
}
3837

39-
SPECIAL_CASE_LICENSE_IDENTIFIERS = {}
40-
4138
SPDX_IGNORE_FILENAME = ".spdx-ignore"
4239

4340

@@ -85,14 +82,6 @@ def get_top_level_directory(normalized_path):
8582

8683
def get_expected_license_identifier(filepath):
8784
normalized_path = normalize_repo_path(filepath)
88-
matching_special_cases = [
89-
(prefix, license_identifier)
90-
for prefix, license_identifier in SPECIAL_CASE_LICENSE_IDENTIFIERS.items()
91-
if fnmatch.fnmatchcase(normalized_path, prefix)
92-
]
93-
if matching_special_cases:
94-
return max(matching_special_cases, key=lambda item: len(item[0]))[1], None
95-
9685
top_level_directory = get_top_level_directory(normalized_path)
9786
if top_level_directory is None:
9887
return TOP_LEVEL_FILE_LICENSE_IDENTIFIER, None

toolshed/sync_licenses.py

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)