Skip to content

Commit

Permalink
docs(license): migrate to SPDX headers
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxdaemon committed May 23, 2024
1 parent 9ff79b1 commit 9a7a066
Show file tree
Hide file tree
Showing 18 changed files with 69 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,11 @@ repos:
rev: '36d4912df1f0bd2ed8cc535b57c5ba3b09ce3d46' # frozen: v0.35.0
hooks:
- id: nitpick
- repo: "https://github.com/TotallyNotRobots/check-spdx-header"
rev: '2a52cf804e6dedd045e765185382d4f916ae2f3f' # frozen: 0.1.0a2
hooks:
- id: fix-spdx-header

minimum_pre_commit_version: 2.18.0
default_install_hook_types:
- pre-commit
Expand Down
2 changes: 1 addition & 1 deletion LICENSE → LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 linuxdaemon
Copyright (c) 2018-present linuxdaemon <linuxdaemon.irc@gmail.com>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 4 additions & 0 deletions polymatch/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2018-present linuxdaemon <linuxdaemon.irc@gmail.com>
#
# SPDX-License-Identifier: MIT

"""Polymorphic pattern matchers."""

from polymatch._version import (
Expand Down
4 changes: 4 additions & 0 deletions polymatch/base.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2018-present linuxdaemon <linuxdaemon.irc@gmail.com>
#
# SPDX-License-Identifier: MIT

"""Base matcher classes.
Matchers should implement `PolymorphicMatcher`.
Expand Down
4 changes: 4 additions & 0 deletions polymatch/error.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2018-present linuxdaemon <linuxdaemon.irc@gmail.com>
#
# SPDX-License-Identifier: MIT

"""Exceptions raised by the library."""

from typing import TYPE_CHECKING, AnyStr, Type
Expand Down
4 changes: 4 additions & 0 deletions polymatch/matchers/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# SPDX-FileCopyrightText: 2018-present linuxdaemon <linuxdaemon.irc@gmail.com>
#
# SPDX-License-Identifier: MIT

"""Core matcher implementations."""
4 changes: 4 additions & 0 deletions polymatch/matchers/glob.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2018-present linuxdaemon <linuxdaemon.irc@gmail.com>
#
# SPDX-License-Identifier: MIT

"""Glob pattern matcher."""

from fnmatch import translate
Expand Down
4 changes: 4 additions & 0 deletions polymatch/matchers/regex.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2018-present linuxdaemon <linuxdaemon.irc@gmail.com>
#
# SPDX-License-Identifier: MIT

"""Regex pattern matcher."""

from typing import AnyStr
Expand Down
4 changes: 4 additions & 0 deletions polymatch/matchers/standard.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2018-present linuxdaemon <linuxdaemon.irc@gmail.com>
#
# SPDX-License-Identifier: MIT

"""Basic string matchers (exact and contains)."""

from typing import AnyStr
Expand Down
4 changes: 4 additions & 0 deletions polymatch/registry.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2018-present linuxdaemon <linuxdaemon.irc@gmail.com>
#
# SPDX-License-Identifier: MIT

"""Pattern matcher registry.
This also implements parsing the pattern from a simple string e.g.:
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -208,3 +208,6 @@ major_version_zero = true

[tool.nitpick]
style = ["gh://TotallyNotRobots/nitpick/lib-style.toml"]

[tool.check-spdx-header]
headers = ["2018-present linuxdaemon <linuxdaemon.irc@gmail.com>"]
4 changes: 4 additions & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# SPDX-FileCopyrightText: 2018-present linuxdaemon <linuxdaemon.irc@gmail.com>
#
# SPDX-License-Identifier: MIT

"""Library tests."""
4 changes: 4 additions & 0 deletions tests/base_test.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2018-present linuxdaemon <linuxdaemon.irc@gmail.com>
#
# SPDX-License-Identifier: MIT

"""Test base patterns."""

import pytest
Expand Down
4 changes: 4 additions & 0 deletions tests/test_glob.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2018-present linuxdaemon <linuxdaemon.irc@gmail.com>
#
# SPDX-License-Identifier: MIT

"""Test glob matcher."""

import pytest
Expand Down
4 changes: 4 additions & 0 deletions tests/test_pickling.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2018-present linuxdaemon <linuxdaemon.irc@gmail.com>
#
# SPDX-License-Identifier: MIT

"""Test pickling the pattern objects."""

import itertools
Expand Down
4 changes: 4 additions & 0 deletions tests/test_regex.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2018-present linuxdaemon <linuxdaemon.irc@gmail.com>
#
# SPDX-License-Identifier: MIT

"""Test regex matcher."""

import pytest
Expand Down
4 changes: 4 additions & 0 deletions tests/test_registry.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2018-present linuxdaemon <linuxdaemon.irc@gmail.com>
#
# SPDX-License-Identifier: MIT

"""Test the pattern registry."""

import pytest
Expand Down
4 changes: 4 additions & 0 deletions tests/test_standard.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# SPDX-FileCopyrightText: 2018-present linuxdaemon <linuxdaemon.irc@gmail.com>
#
# SPDX-License-Identifier: MIT

"""Test standard matchers."""

import pytest
Expand Down

0 comments on commit 9a7a066

Please sign in to comment.