Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #7324: Emit a warning if multiple files for same document found #7351

Merged

Conversation

tk0miya
Copy link
Member

@tk0miya tk0miya commented Mar 21, 2020

@tk0miya tk0miya added type:bug type:enhancement enhance or introduce a new feature labels Mar 21, 2020
@tk0miya tk0miya added this to the 3.0.0 milestone Mar 21, 2020
files = [relpath(f, self.srcdir) for f in glob(pattern)]
logger.warning(__('multiple files found for the document "%s": %r\n'
'Use %r for the build.'),
docname, files, self.doc2path(docname), once=True)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now project.discover() is called twice. So I needed to improve logger.warning() to suppress this warning on the second call.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Copy link
Member

@shimizukawa shimizukawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

files = [relpath(f, self.srcdir) for f in glob(pattern)]
logger.warning(__('multiple files found for the document "%s": %r\n'
'Use %r for the build.'),
docname, files, self.doc2path(docname), once=True)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@tk0miya
Copy link
Member Author

tk0miya commented Mar 22, 2020

Thank you for reviewing!

@tk0miya tk0miya merged commit 79989ce into sphinx-doc:3.x Mar 22, 2020
@tk0miya tk0miya deleted the 7324_multiple_suffixes_for_same_document branch March 22, 2020 08:08
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type:bug type:enhancement enhance or introduce a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants