Skip to content

Commit

Permalink
List names of multiple licence files in warning message.
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed Feb 11, 2025
1 parent 15cdc44 commit a3bd07b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions sphinx_licenseinfo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def run(self) -> List[docutils.nodes.Node]:
self.state.reporter.warning(
f"Found more than one file matching the pattern 'LICEN[CS]E*' "
f"for distribution {distro.name!r} version {distro.version}\n"
f"({license_files!r})\n"
f"Using the first one.",
line=self.lineno,
)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def test_html_output_problematic(
expeted_warnings = [
"problematic.rst:7: WARNING: '.. license::' requires exactly one option, got 0",
"problematic.rst:9: WARNING: Found more than one file matching the pattern 'LICEN[CS]E*' "
"for distribution 'packaging' version 21.0\nUsing the first one.",
"for distribution 'packaging' version 21.0\n(['LICENSE', 'LICENSE.APACHE', 'LICENSE.BSD'])\nUsing the first one.",
"problematic.rst:12: WARNING: No 'LICENSE' file (or similar) found for distribution 'CacheControl' version 0.12.6",
]

Expand Down

0 comments on commit a3bd07b

Please sign in to comment.