mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Run Ruff on `doc/usage/extensions/
`
This commit is contained in:
parent
013dcdc3b8
commit
ff2693242d
@ -6,7 +6,6 @@ extend-exclude = [
|
||||
"tests/roots/*",
|
||||
"build/*",
|
||||
"doc/_build/*",
|
||||
"doc/usage/extensions/example*.py",
|
||||
]
|
||||
|
||||
[format]
|
||||
@ -276,6 +275,13 @@ select = [
|
||||
"FURB118",
|
||||
"T201"
|
||||
]
|
||||
"doc/usage/extensions/example_{google,numpy}.py" = [
|
||||
"D416", # Section name should end with a colon ("{name}")
|
||||
"I002", # Missing required import: {name}
|
||||
"INP001", # File {filename} is part of an implicit namespace package. Add an __init__.py.
|
||||
"PLW3201", # Dunder method {name} has no special meaning in Python 3
|
||||
]
|
||||
|
||||
"sphinx/domains/**" = ["FURB113"]
|
||||
"tests/test_domains/test_domain_cpp.py" = ["FURB113"]
|
||||
|
||||
|
@ -121,7 +121,8 @@ def module_level_function(param1, param2=None, *args, **kwargs):
|
||||
|
||||
"""
|
||||
if param1 == param2:
|
||||
raise ValueError('param1 may not be equal to param2')
|
||||
msg = 'param1 may not be equal to param2'
|
||||
raise ValueError(msg)
|
||||
return True
|
||||
|
||||
|
||||
@ -235,7 +236,7 @@ class ExampleClass:
|
||||
|
||||
@readwrite_property.setter
|
||||
def readwrite_property(self, value):
|
||||
value
|
||||
_ = value
|
||||
|
||||
def example_method(self, param1, param2):
|
||||
"""Class methods are similar to regular functions.
|
||||
|
@ -154,7 +154,8 @@ def module_level_function(param1, param2=None, *args, **kwargs):
|
||||
|
||||
"""
|
||||
if param1 == param2:
|
||||
raise ValueError('param1 may not be equal to param2')
|
||||
msg = 'param1 may not be equal to param2'
|
||||
raise ValueError(msg)
|
||||
return True
|
||||
|
||||
|
||||
@ -288,7 +289,7 @@ class ExampleClass:
|
||||
|
||||
@readwrite_property.setter
|
||||
def readwrite_property(self, value):
|
||||
value
|
||||
_ = value
|
||||
|
||||
def example_method(self, param1, param2):
|
||||
"""Class methods are similar to regular functions.
|
||||
|
Loading…
Reference in New Issue
Block a user