mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Enable E241 (Multiple spaces after comma)
This commit is contained in:
parent
f1ee0b2951
commit
e3f0342932
@ -310,6 +310,7 @@ select = [
|
||||
"E227", # Missing whitespace around bitwise or shift operator
|
||||
"E228", # Missing whitespace around modulo operator
|
||||
"E231", # Missing whitespace after '{token}'
|
||||
"E241", # Multiple spaces after comma
|
||||
]
|
||||
|
||||
[tool.ruff.per-file-ignores]
|
||||
@ -318,6 +319,9 @@ select = [
|
||||
# allow print() in the tutorial
|
||||
"doc/development/tutorials/examples/recipe.py" = ["T201"]
|
||||
|
||||
# from .flake8
|
||||
"sphinx/*" = ["E241"]
|
||||
|
||||
# whitelist ``print`` for stdout messages
|
||||
"sphinx/cmd/build.py" = ["T201"]
|
||||
"sphinx/cmd/make_mode.py" = ["T201"]
|
||||
|
@ -215,9 +215,9 @@ class ReSTDomain(Domain):
|
||||
label = 'reStructuredText'
|
||||
|
||||
object_types = {
|
||||
'directive': ObjType(_('directive'), 'dir'),
|
||||
'directive': ObjType(_('directive'), 'dir'),
|
||||
'directive:option': ObjType(_('directive-option'), 'dir'),
|
||||
'role': ObjType(_('role'), 'role'),
|
||||
'role': ObjType(_('role'), 'role'),
|
||||
}
|
||||
directives = {
|
||||
'directive': ReSTDirective,
|
||||
|
@ -19,7 +19,7 @@ DOMAINS = [
|
||||
]
|
||||
|
||||
|
||||
@pytest.mark.parametrize(('directive', 'no_index', 'no_index_entry', 'sig_f', 'sig_g', 'index_g'), DOMAINS)
|
||||
@pytest.mark.parametrize(('directive', 'no_index', 'no_index_entry', 'sig_f', 'sig_g', 'index_g'), DOMAINS)
|
||||
def test_object_description_no_typesetting(app, directive, no_index, no_index_entry, sig_f, sig_g, index_g):
|
||||
text = (f'.. {directive}:: {sig_f}\n'
|
||||
f' :no-typesetting:\n')
|
||||
|
@ -45,12 +45,12 @@ def test_is_allowed_version():
|
||||
assert is_allowed_version('<3.4', '3.3') is True
|
||||
assert is_allowed_version('<3.4', '3.3') is True
|
||||
assert is_allowed_version('<3.2', '3.3') is False
|
||||
assert is_allowed_version('<=3.4', '3.3') is True
|
||||
assert is_allowed_version('<=3.2', '3.3') is False
|
||||
assert is_allowed_version('==3.3', '3.3') is True
|
||||
assert is_allowed_version('==3.4', '3.3') is False
|
||||
assert is_allowed_version('>=3.2', '3.3') is True
|
||||
assert is_allowed_version('>=3.4', '3.3') is False
|
||||
assert is_allowed_version('<=3.4', '3.3') is True
|
||||
assert is_allowed_version('<=3.2', '3.3') is False
|
||||
assert is_allowed_version('==3.3', '3.3') is True
|
||||
assert is_allowed_version('==3.4', '3.3') is False
|
||||
assert is_allowed_version('>=3.2', '3.3') is True
|
||||
assert is_allowed_version('>=3.4', '3.3') is False
|
||||
assert is_allowed_version('>3.2', '3.3') is True
|
||||
assert is_allowed_version('>3.4', '3.3') is False
|
||||
assert is_allowed_version('~=3.4', '3.4.5') is True
|
||||
|
Loading…
Reference in New Issue
Block a user