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

Add some known Sphinx roles and directives #8

Closed
wants to merge 4 commits into from
Closed

Conversation

peterjc
Copy link
Owner

@peterjc peterjc commented Nov 14, 2018

This is a possible step towards solving #7, but not being a heavy Sphinx user (yet), I am unsure if it goes far enough? Feedback welcome.

With this change, will not raise RST303 and RST304 for a hard coded list of Sphinx roles and directives from std, rst and py domains (e.g. :py:class: or :class:).

$ flake8 tests/test_cases/sphinx-py.py
tests/test_cases/sphinx-py.py:8:1: RST303 Unknown directive type "py:function".
tests/test_cases/sphinx-py.py:26:1: RST304 Unknown interpreted text role "class".
tests/test_cases/sphinx-py.py:28:1: RST304 Unknown interpreted text role "py:class".
From the std, rst and py domains. See also
http://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html

TODO: Allow these lists to be altered via flake8 preferences
@peterjc
Copy link
Owner Author

peterjc commented Jan 10, 2019

Rebasing for changes to adopt black coding style...

@peterjc
Copy link
Owner Author

peterjc commented Jan 10, 2019

@peterjc
Copy link
Owner Author

peterjc commented Jun 25, 2019

See discussion on #7, I will not add a hard coded list.

Rather, new configuration setting(s) for users to add their own list of roles/directives to be ignored seems best (default an empty list).

@peterjc peterjc closed this Jun 25, 2019
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.

1 participant