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
Setting the "copyright" for a Sphinx project requires overriding a builtin #8132
Comments
+1 project_copyright might be the Sphinx alternative |
Ah, it's true that it's battling with a built-in global variable. |
-0: I consider conf.py is a configuration file (using python syntax). So it is not necessary to lint it. But I don't object to adding a new alias. |
Close #8132: Add project_copyright confval as an alias of copyright
@tk0miya - Thank you! I appreciate that you fixed this, especially despite being
I happen to lint configuration files where I can, e.g. with YAML linters, with |
To follow the warnings from lint tools, we can't use the name of python builtin functions and variables for the configurations of Sphinx because of we're using .py script as a file format. It means nobody warns to use Anyway, I can agree with the new alias name; |
Linting and test coverage are important for some projects and this would be multiplied by each team using flake8 scans to scan code. Would team consider adding # noqa A001 to the scaffolding tools to silence the flake8-builtins lint check, if copyright isn't to be renamed, and for backwards compatibility? |
Describe the bug
copyright
is a constant added by thesite
module in Python.copyright
is also a Sphinx configuration variable overriding this.This means that
pylint
(correctly, I think) errors withredefined-builtin
when acopyright
is set inconf.py
.Expected behavior
I think that it would be best to provide an alternative name for this variable name.
Environment info
The text was updated successfully, but these errors were encountered: