mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2026-11-02 20:30:30 -06:00
Run Ruff on `doc/usage/extensions/`
This commit is contained in:
1 parent
013dcdc3b8
commit
ff2693242d
3 files changed
+13
-5
No files matched your search
@@ -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.
|
||||
|
||||
Reference in new issue
Block a user