Skip to content

Commit 35e00b4

Browse files
authored
fix: file copyright headers (#676)
utilizes flake8 plugin <https://pypi.org/project/flake8-copyright-validator/> to assert the correct headers Signed-off-by: Jan Kowalleck <[email protected]>
1 parent 934d39d commit 35e00b4

Some content is hidden

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

70 files changed

+117
-44
lines changed

.flake8

+19
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,22 @@ ignore =
2222
# > Despite being in the best practice section, this will soon be considered an anti-pattern.
2323
# So lets ignore this "suggestion" that is actually an anti-pattern already!
2424
W503
25+
26+
## https://pypi.org/project/flake8-copyright-validator/
27+
copyright-text =
28+
'# This file is part of CycloneDX Python Library'
29+
'#'
30+
'# Licensed under the Apache License, Version 2.0 (the "License");'
31+
'# you may not use this file except in compliance with the License.'
32+
'# You may obtain a copy of the License at'
33+
'#'
34+
'# http://www.apache.org/licenses/LICENSE-2.0'
35+
'#'
36+
'# Unless required by applicable law or agreed to in writing, software'
37+
'# distributed under the License is distributed on an "AS IS" BASIS,'
38+
'# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.'
39+
'# See the License for the specific language governing permissions and'
40+
'# limitations under the License.'
41+
'#'
42+
'# SPDX-License-Identifier: Apache-2.0'
43+
'# Copyright (c) OWASP Foundation. All Rights Reserved.'

cyclonedx/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is part of CycloneDX Python Library
2+
#
13
# Licensed under the Apache License, Version 2.0 (the "License");
24
# you may not use this file except in compliance with the License.
35
# You may obtain a copy of the License at

cyclonedx/_internal/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is part of CycloneDX Python Library
2+
#
13
# Licensed under the Apache License, Version 2.0 (the "License");
24
# you may not use this file except in compliance with the License.
35
# You may obtain a copy of the License at

cyclonedx/_internal/compare.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is part of CycloneDX Python Library
2+
#
13
# Licensed under the Apache License, Version 2.0 (the "License");
24
# you may not use this file except in compliance with the License.
35
# You may obtain a copy of the License at

cyclonedx/_internal/hash.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is part of CycloneDX Python Library
2+
#
13
# Licensed under the Apache License, Version 2.0 (the "License");
24
# you may not use this file except in compliance with the License.
35
# You may obtain a copy of the License at

cyclonedx/_internal/time.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is part of CycloneDX Python Library
2+
#
13
# Licensed under the Apache License, Version 2.0 (the "License");
24
# you may not use this file except in compliance with the License.
35
# You may obtain a copy of the License at

cyclonedx/exception/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is part of CycloneDX Python Library
2+
#
13
# Licensed under the Apache License, Version 2.0 (the "License");
24
# you may not use this file except in compliance with the License.
35
# You may obtain a copy of the License at

cyclonedx/exception/factory.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is part of CycloneDX Python Library
2+
#
13
# Licensed under the Apache License, Version 2.0 (the "License");
24
# you may not use this file except in compliance with the License.
35
# You may obtain a copy of the License at

cyclonedx/exception/model.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is part of CycloneDX Python Library
2+
#
13
# Licensed under the Apache License, Version 2.0 (the "License");
24
# you may not use this file except in compliance with the License.
35
# You may obtain a copy of the License at

cyclonedx/exception/output.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is part of CycloneDX Python Library
2+
#
13
# Licensed under the Apache License, Version 2.0 (the "License");
24
# you may not use this file except in compliance with the License.
35
# You may obtain a copy of the License at

cyclonedx/exception/serialization.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is part of CycloneDX Python Library
2+
#
13
# Licensed under the Apache License, Version 2.0 (the "License");
24
# you may not use this file except in compliance with the License.
35
# You may obtain a copy of the License at

cyclonedx/factory/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is part of CycloneDX Python Library
2+
#
13
# Licensed under the Apache License, Version 2.0 (the "License");
24
# you may not use this file except in compliance with the License.
35
# You may obtain a copy of the License at

cyclonedx/factory/license.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is part of CycloneDX Python Library
2+
#
13
# Licensed under the Apache License, Version 2.0 (the "License");
24
# you may not use this file except in compliance with the License.
35
# You may obtain a copy of the License at

cyclonedx/model/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is part of CycloneDX Python Library
2+
#
13
# Licensed under the Apache License, Version 2.0 (the "License");
24
# you may not use this file except in compliance with the License.
35
# You may obtain a copy of the License at

cyclonedx/model/bom.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python Library
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

cyclonedx/model/bom_ref.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python Library
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

cyclonedx/model/component.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python Library
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

cyclonedx/model/contact.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is part of CycloneDX Python Library
2+
#
13
# Licensed under the Apache License, Version 2.0 (the "License");
24
# you may not use this file except in compliance with the License.
35
# You may obtain a copy of the License at

cyclonedx/model/crypto.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python Library
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

cyclonedx/model/dependency.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python Library
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

cyclonedx/model/impact_analysis.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python Library
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

cyclonedx/model/issue.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is part of CycloneDX Python Library
2+
#
13
# Licensed under the Apache License, Version 2.0 (the "License");
24
# you may not use this file except in compliance with the License.
35
# You may obtain a copy of the License at

cyclonedx/model/license.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# encoding: utf-8
2-
1+
# This file is part of CycloneDX Python Library
2+
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
55
# You may obtain a copy of the License at

cyclonedx/model/release_note.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python Library
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

cyclonedx/model/service.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is part of CycloneDX Python Library
2+
#
13
# Licensed under the Apache License, Version 2.0 (the "License");
24
# you may not use this file except in compliance with the License.
35
# You may obtain a copy of the License at

cyclonedx/model/vulnerability.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python Library
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

cyclonedx/output/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is part of CycloneDX Python Library
2+
#
13
# Licensed under the Apache License, Version 2.0 (the "License");
24
# you may not use this file except in compliance with the License.
35
# You may obtain a copy of the License at

cyclonedx/output/json.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python Library
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

cyclonedx/output/xml.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python Library
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

cyclonedx/schema/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is part of CycloneDX Python Library
2+
#
13
# Licensed under the Apache License, Version 2.0 (the "License");
24
# you may not use this file except in compliance with the License.
35
# You may obtain a copy of the License at

cyclonedx/schema/_res/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is part of CycloneDX Python Library
2+
#
13
# Licensed under the Apache License, Version 2.0 (the "License");
24
# you may not use this file except in compliance with the License.
35
# You may obtain a copy of the License at

cyclonedx/schema/schema.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python Library
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

cyclonedx/serialization/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is part of CycloneDX Python Library
2+
#
13
# Licensed under the Apache License, Version 2.0 (the "License");
24
# you may not use this file except in compliance with the License.
35
# You may obtain a copy of the License at

cyclonedx/spdx.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is part of CycloneDX Python Library
2+
#
13
# Licensed under the Apache License, Version 2.0 (the "License");
24
# you may not use this file except in compliance with the License.
35
# You may obtain a copy of the License at

cyclonedx/validation/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is part of CycloneDX Python Library
2+
#
13
# Licensed under the Apache License, Version 2.0 (the "License");
24
# you may not use this file except in compliance with the License.
35
# You may obtain a copy of the License at

cyclonedx/validation/json.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is part of CycloneDX Python Library
2+
#
13
# Licensed under the Apache License, Version 2.0 (the "License");
24
# you may not use this file except in compliance with the License.
35
# You may obtain a copy of the License at

cyclonedx/validation/model.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is part of CycloneDX Python Library
2+
#
13
# Licensed under the Apache License, Version 2.0 (the "License");
24
# you may not use this file except in compliance with the License.
35
# You may obtain a copy of the License at

cyclonedx/validation/xml.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is part of CycloneDX Python Library
2+
#
13
# Licensed under the Apache License, Version 2.0 (the "License");
24
# you may not use this file except in compliance with the License.
35
# You may obtain a copy of the License at

examples/complex_deserialize.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python Library
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

examples/complex_serialize.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python Library
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

pyproject.toml

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ coverage = "7.6.1"
8686
flake8 = { version="7.1.1", python=">=3.8.1" }
8787
flake8-annotations = { version="3.1.1", python=">=3.8.1" }
8888
flake8-bugbear = { version="24.8.19", python=">=3.8.1" }
89+
flake8-copyright-validator = "0.0.1"
8990
flake8-isort = "6.1.1"
9091
flake8-quotes = "3.4.0"
9192
flake8-use-fstring = "1.4"

tests/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python Library
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

tests/_data/__init__.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# encoding: utf-8
2-
3-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python Library
42
#
53
# Licensed under the Apache License, Version 2.0 (the "License");
64
# you may not use this file except in compliance with the License.

tests/_data/models.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python Library
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

tests/test_component.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python Library
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

tests/test_deserialize_json.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python Library
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

tests/test_deserialize_xml.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python Library
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

tests/test_enums.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This file is part of CycloneDX Python Library
2+
#
13
# Licensed under the Apache License, Version 2.0 (the "License");
24
# you may not use this file except in compliance with the License.
35
# You may obtain a copy of the License at

tests/test_factory_license.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python Library
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

tests/test_model.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python Library
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

tests/test_model_bom.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python Library
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

tests/test_model_bom_ref.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python Library
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

tests/test_model_component.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python Library
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

tests/test_model_dependency.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python Library
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

tests/test_model_issue.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python Library
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

tests/test_model_license.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python Library
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

tests/test_model_release_note.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python Library
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

tests/test_model_service.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python Library
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

tests/test_model_vulnerability.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python Library
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

tests/test_output.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python Library
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

tests/test_output_json.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python Library
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

tests/test_output_xml.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# This file is part of CycloneDX Python Lib
1+
# This file is part of CycloneDX Python Library
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)