Skip to content

Commit

Permalink
reorganize the licenses module a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
ewdurbin committed Sep 15, 2024
1 parent 8906b16 commit a361294
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ ignore_missing_imports = true
[tool.ruff]
src = ["src"]
extend-exclude = [
"src/packaging/licenses/spdx.py"
"src/packaging/licenses/_spdx.py"
]

[tool.ruff.lint]
Expand Down
8 changes: 7 additions & 1 deletion src/packaging/licenses/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,13 @@
import re
from typing import NewType

from packaging.licenses.spdx import EXCEPTIONS, LICENSES
from packaging.licenses._spdx import EXCEPTIONS, LICENSES

__all__ = [
"NormalizedLicenseExpression",
"InvalidLicenseExpression",
"canonicalize_license_expression",
]

license_ref_allowed = re.compile("^[A-Za-z0-9.-]*$")

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tasks/licenses.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def main():
}

project_root = pathlib.Path(__file__).resolve().parent.parent
data_file = project_root / "src" / "packaging" / "licenses" / "spdx.py"
data_file = project_root / "src" / "packaging" / "licenses" / "_spdx.py"

with closing(StringIO()) as file_contents:
file_contents.write(
Expand Down

0 comments on commit a361294

Please sign in to comment.