Skip to content

Small update to conf.py file to avoid build errors#219

Merged
deb-intel merged 1 commit intothesofproject:masterfrom
deb-intel:confpy-update
Apr 13, 2020
Merged

Small update to conf.py file to avoid build errors#219
deb-intel merged 1 commit intothesofproject:masterfrom
deb-intel:confpy-update

Conversation

@deb-intel
Copy link
Collaborator

No description provided.

@deb-intel deb-intel merged commit 62101de into thesofproject:master Apr 13, 2020
if "tox" not in exclude_patterns:
exclude_patterns.append(".tox")
except:
exclude_patterns = [".tox"]
Copy link
Collaborator

Choose a reason for hiding this comment

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

How can an exclude_patterns be anything else than the constant defined at the top?

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is code is generated by another tool, which cannot assume that the list exists. If you'd prefer '.tox' can be added to the definition above. More generally, the conf.py get's executed before Sphinx runs, so any kind of Python code can be included, including registering methods with Sphinx to change the functionality of Sphinx.

Copy link
Collaborator

Choose a reason for hiding this comment

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

If you'd prefer '.tox' can be added to the definition above.

I don't have any preference, at least not yet, just ignorance and fear :-) I made a one-line change to this file recently (a7e77d4) and now that you say it is generated I'm afraid I didn't know what I was doing.

This is code is generated by another tool, which cannot assume that the list exists.

The comment at the top says it was generated the very first time but it doesn't seem to say anything about generating any part of it again...?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not a big fan of the conf.py as it mixes concerns: setting global variables and executable code. I'd prefer a true settings file: either .ini or .json. So fear justified. ;-) The conf.py is created by sphinx-quickstart when you create a new project and is one of the few required files for Sphinx. The snippet with exclude patterns is generated by the GUI app I mentioned - Sphinx goes nuts trying to parse its own .rst docs in the .tox directory if you don't. That's why it adds it at the end, so as not to mess with other settings. Both happen exactly once, so any other changes are fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants