mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Run Tools/scripts/reindent.py (GH-94225)
Reindent files which were not properly formatted (PEP 8: 4 spaces).
Remove also some trailing spaces.
(cherry picked from commit e87ada48a9
)
Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
parent
68112c3f70
commit
f0f3a424af
4 changed files with 4 additions and 5 deletions
|
@ -942,7 +942,7 @@ class HTTPConnection:
|
||||||
(self.host,self.port), self.timeout, self.source_address)
|
(self.host,self.port), self.timeout, self.source_address)
|
||||||
# Might fail in OSs that don't implement TCP_NODELAY
|
# Might fail in OSs that don't implement TCP_NODELAY
|
||||||
try:
|
try:
|
||||||
self.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
|
self.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
if e.errno != errno.ENOPROTOOPT:
|
if e.errno != errno.ENOPROTOOPT:
|
||||||
raise
|
raise
|
||||||
|
|
|
@ -157,4 +157,3 @@ def _adjust_resource_limits():
|
||||||
except (ValueError, OSError) as err:
|
except (ValueError, OSError) as err:
|
||||||
print(f"Unable to raise RLIMIT_NOFILE from {fd_limit} to "
|
print(f"Unable to raise RLIMIT_NOFILE from {fd_limit} to "
|
||||||
f"{new_fd_limit}: {err}.")
|
f"{new_fd_limit}: {err}.")
|
||||||
|
|
||||||
|
|
|
@ -335,7 +335,7 @@ class AST_Tests(unittest.TestCase):
|
||||||
for snippet in snippets_to_validate:
|
for snippet in snippets_to_validate:
|
||||||
tree = ast.parse(snippet)
|
tree = ast.parse(snippet)
|
||||||
compile(tree, '<string>', 'exec')
|
compile(tree, '<string>', 'exec')
|
||||||
|
|
||||||
def test_invalid_position_information(self):
|
def test_invalid_position_information(self):
|
||||||
invalid_linenos = [
|
invalid_linenos = [
|
||||||
(10, 1), (-10, -11), (10, -11), (-5, -2), (-5, 1)
|
(10, 1), (-10, -11), (10, -11), (-5, -2), (-5, 1)
|
||||||
|
@ -364,7 +364,7 @@ class AST_Tests(unittest.TestCase):
|
||||||
|
|
||||||
def test_compilation_of_ast_nodes_with_default_end_position_values(self):
|
def test_compilation_of_ast_nodes_with_default_end_position_values(self):
|
||||||
tree = ast.Module(body=[
|
tree = ast.Module(body=[
|
||||||
ast.Import(names=[ast.alias(name='builtins', lineno=1, col_offset=0)], lineno=1, col_offset=0),
|
ast.Import(names=[ast.alias(name='builtins', lineno=1, col_offset=0)], lineno=1, col_offset=0),
|
||||||
ast.Import(names=[ast.alias(name='traceback', lineno=0, col_offset=0)], lineno=0, col_offset=1)
|
ast.Import(names=[ast.alias(name='traceback', lineno=0, col_offset=0)], lineno=0, col_offset=1)
|
||||||
], type_ignores=[])
|
], type_ignores=[])
|
||||||
|
|
||||||
|
|
|
@ -955,7 +955,7 @@ class TestExceptStarExceptionGroupSubclass(ExceptStarTest):
|
||||||
def test_falsy_exception_group_subclass(self):
|
def test_falsy_exception_group_subclass(self):
|
||||||
class FalsyEG(ExceptionGroup):
|
class FalsyEG(ExceptionGroup):
|
||||||
def __bool__(self):
|
def __bool__(self):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def derive(self, excs):
|
def derive(self, excs):
|
||||||
return FalsyEG(self.message, excs)
|
return FalsyEG(self.message, excs)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue