mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Enable the PLC0206 lint in Ruff
This commit is contained in:
@@ -36,7 +36,6 @@ ignore = [
|
||||
# flake8-pie ('PIE')
|
||||
"PIE790", # Unnecessary `pass` statement
|
||||
# pylint ('PLC')
|
||||
"PLC0206", # Extracting value from dictionary without calling `.items()`
|
||||
"PLC0415", # `import` should be at the top-level of a file
|
||||
"PLC1901", # simplify truthy/falsey string comparisons
|
||||
"PLC2701", # Private name import `{name}` from external module `{module}`
|
||||
|
||||
@@ -31,9 +31,9 @@ def mock_input(
|
||||
'answer for %r missing and no default present' % prompt
|
||||
)
|
||||
called.add(prompt)
|
||||
for question in answers:
|
||||
for question, answer in answers.items():
|
||||
if prompt.startswith(qs.PROMPT_PREFIX + question):
|
||||
return answers[question]
|
||||
return answer
|
||||
if needanswer:
|
||||
raise AssertionError('answer for %r missing' % prompt)
|
||||
return ''
|
||||
|
||||
Reference in New Issue
Block a user