mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Enable the PLW1514 lint in Ruff
This commit is contained in:
parent
3920af4700
commit
43312ef8ac
@ -57,7 +57,6 @@ ignore = [
|
||||
"PLR6201", # Use a set literal when testing for membership
|
||||
"PLR6301", # Method `{method_name}` could be a function, class method, or static method
|
||||
# pylint ('PLW')
|
||||
"PLW1514", # `{function_name}` in text mode without explicit `encoding` argument
|
||||
"PLW1641", # Object does not implement `__hash__` method
|
||||
"PLW2901", # Outer {outer_kind} variable `{name}` overwritten by inner {inner_kind} target
|
||||
"PLW3201", # Dunder method `{name}` has no special meaning in Python 3
|
||||
|
@ -106,7 +106,7 @@ class Make:
|
||||
try:
|
||||
with chdir(self.build_dir_join('latex')):
|
||||
if '-Q' in self.opts:
|
||||
with open('__LATEXSTDOUT__', 'w') as outfile:
|
||||
with open('__LATEXSTDOUT__', 'w', encoding='utf-8') as outfile:
|
||||
returncode = subprocess.call(
|
||||
[
|
||||
makecmd,
|
||||
|
@ -41,7 +41,7 @@ def save_traceback(app: Sphinx | None, exc: BaseException) -> str:
|
||||
)
|
||||
|
||||
with NamedTemporaryFile(
|
||||
'w', suffix='.log', prefix='sphinx-err-', delete=False
|
||||
'w', encoding='utf-8', suffix='.log', prefix='sphinx-err-', delete=False
|
||||
) as f:
|
||||
f.write(f"""\
|
||||
# Platform: {sys.platform}; ({platform.platform()})
|
||||
|
Loading…
Reference in New Issue
Block a user