Skip to content

Commit

Permalink
✔ pre-commit: Add license check
Browse files Browse the repository at this point in the history
  • Loading branch information
mikegerber committed Jul 22, 2024
1 parent f2e290d commit 3233dbc
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ repos:
- id: black

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.3
rev: v0.5.4
hooks:
- args:
- --fix
- --exit-non-zero-on-fix
id: ruff

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.10.1
rev: v1.11.0
hooks:
- additional_dependencies:
- types-setuptools
Expand All @@ -39,3 +39,9 @@ repos:
rev: v0.3.3post1
hooks:
- id: pre-commit-update

- repo: https://github.com/dhatim/python-license-check
rev: 0.9.2
hooks:
- id: liccheck
language: system
31 changes: 31 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,34 @@ disallow_untyped_calls = false

[tool.ruff.lint]
select = ["E", "F", "I"]


[tool.liccheck]
authorized_licenses = [
"bsd",
"new bsd",
"bsd license",
"new bsd license",
"simplified bsd",
"apache",
"apache 2.0",
"apache software license",
"apache software",
"apache license 2.0",
"gnu lgpl",
"lgpl with exceptions or zpl",
"GNU Library or Lesser General Public License (LGPL)",
"GNU Lesser General Public License v3 (LGPLv3)",
"GNU Lesser General Public License v2 or later (LGPLv2+)",
"mit",
"mit license",
"python software foundation",
"Historical Permission Notice and Disclaimer (HPND)",
"public domain",
'The Unlicense (Unlicense)',
"isc",
'Mozilla Public License 2.0 (MPL 2.0)',
]
unauthorized_licenses = [
"gpl v3",
]
2 changes: 2 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ mypy
types-lxml
types-setuptools
pytest-mypy

liccheck

0 comments on commit 3233dbc

Please sign in to comment.