diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8173b11..9c9cf2f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,8 +3,8 @@ repos: rev: 79b8e4f273301e412602c856ddbc0c066765c98c # frozen: v1.1.11 hooks: - id: insert-license - files: '^src/.+\.py$' - args: ['--license-filepath', 'LICENSE'] + files: '^src/.+\.py$|^tests/.+\.py$' + args: ['--license-filepath', 'LICENSE-HEADER'] - repo: https://github.com/executablebooks/mdformat rev: a5f167d00d7a1990e69ee02efacc15d6136ea1aa # frozen: 0.7.13 hooks: diff --git a/LICENSE-HEADER b/LICENSE-HEADER new file mode 100644 index 0000000..aba78dd --- /dev/null +++ b/LICENSE-HEADER @@ -0,0 +1,3 @@ +SPDX-License-Identifier: MIT +SPDX-FileCopyrightText: 2021 Taneli Hukkinen +Licensed to PSF under a Contributor Agreement. diff --git a/src/tomli/__init__.py b/src/tomli/__init__.py index d0d8ecf..34b0b40 100644 --- a/src/tomli/__init__.py +++ b/src/tomli/__init__.py @@ -1,24 +1,6 @@ -# MIT License -# -# Copyright (c) 2021 Taneli Hukkinen -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# SPDX-License-Identifier: MIT +# SPDX-FileCopyrightText: 2021 Taneli Hukkinen +# Licensed to PSF under a Contributor Agreement. __all__ = ("loads", "load", "TOMLDecodeError") __version__ = "2.0.0" # DO NOT EDIT THIS LINE MANUALLY. LET bump2version UTILITY DO IT diff --git a/src/tomli/_parser.py b/src/tomli/_parser.py index c000196..65da389 100644 --- a/src/tomli/_parser.py +++ b/src/tomli/_parser.py @@ -1,24 +1,6 @@ -# MIT License -# -# Copyright (c) 2021 Taneli Hukkinen -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# SPDX-License-Identifier: MIT +# SPDX-FileCopyrightText: 2021 Taneli Hukkinen +# Licensed to PSF under a Contributor Agreement. from __future__ import annotations diff --git a/src/tomli/_re.py b/src/tomli/_re.py index 8603fae..994bb74 100644 --- a/src/tomli/_re.py +++ b/src/tomli/_re.py @@ -1,24 +1,6 @@ -# MIT License -# -# Copyright (c) 2021 Taneli Hukkinen -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# SPDX-License-Identifier: MIT +# SPDX-FileCopyrightText: 2021 Taneli Hukkinen +# Licensed to PSF under a Contributor Agreement. from __future__ import annotations diff --git a/src/tomli/_types.py b/src/tomli/_types.py index ad1d810..d949412 100644 --- a/src/tomli/_types.py +++ b/src/tomli/_types.py @@ -1,24 +1,6 @@ -# MIT License -# -# Copyright (c) 2021 Taneli Hukkinen -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in all -# copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -# SOFTWARE. +# SPDX-License-Identifier: MIT +# SPDX-FileCopyrightText: 2021 Taneli Hukkinen +# Licensed to PSF under a Contributor Agreement. from typing import Any, Callable, Tuple diff --git a/tests/__init__.py b/tests/__init__.py index 097446a..4e37361 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# SPDX-FileCopyrightText: 2021 Taneli Hukkinen +# Licensed to PSF under a Contributor Agreement. + __all__ = ("tomllib",) # By changing this one line, we can run the tests against diff --git a/tests/burntsushi.py b/tests/burntsushi.py index 39b23a3..71228c6 100644 --- a/tests/burntsushi.py +++ b/tests/burntsushi.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# SPDX-FileCopyrightText: 2021 Taneli Hukkinen +# Licensed to PSF under a Contributor Agreement. + """Utilities for tests that are in the "burntsushi" format.""" import datetime diff --git a/tests/test_data.py b/tests/test_data.py index f6aafbf..d73ff7c 100644 --- a/tests/test_data.py +++ b/tests/test_data.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# SPDX-FileCopyrightText: 2021 Taneli Hukkinen +# Licensed to PSF under a Contributor Agreement. + import json from pathlib import Path import unittest diff --git a/tests/test_error.py b/tests/test_error.py index 5c998da..e2ada25 100644 --- a/tests/test_error.py +++ b/tests/test_error.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# SPDX-FileCopyrightText: 2021 Taneli Hukkinen +# Licensed to PSF under a Contributor Agreement. + import unittest from . import tomllib diff --git a/tests/test_misc.py b/tests/test_misc.py index 9401dae..76fa590 100644 --- a/tests/test_misc.py +++ b/tests/test_misc.py @@ -1,3 +1,7 @@ +# SPDX-License-Identifier: MIT +# SPDX-FileCopyrightText: 2021 Taneli Hukkinen +# Licensed to PSF under a Contributor Agreement. + import copy import datetime from decimal import Decimal as D