Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Lib/pty.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def openpty():
try:
from fcntl import ioctl, I_PUSH
except ImportError:
return master_fd, slave_fd
return master_fd, slave_fd
try:
ioctl(slave_fd, I_PUSH, "ptem")
ioctl(slave_fd, I_PUSH, "ldterm")
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_ast/test_ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -3115,7 +3115,7 @@ def assert_ast(self, code, non_optimized_target, optimized_target):
)

def create_binop(self, operand, left=ast.Constant(1), right=ast.Constant(1)):
return ast.BinOp(left=left, op=self.binop[operand], right=right)
return ast.BinOp(left=left, op=self.binop[operand], right=right)

def test_folding_binop(self):
code = "1 %s 1"
Expand Down
14 changes: 7 additions & 7 deletions Lib/test/test_asyncio/test_eager_task_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,15 +288,15 @@ class DummyLoop:
self.assertFalse(err)

def test_issue122332(self):
async def coro():
pass
async def coro():
pass

async def run():
task = self.loop.create_task(coro())
await task
self.assertIsNone(task.get_coro())
async def run():
task = self.loop.create_task(coro())
await task
self.assertIsNone(task.get_coro())

self.run_coro(run())
self.run_coro(run())


class AsyncTaskCounter:
Expand Down
16 changes: 8 additions & 8 deletions Lib/test/test_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,10 +539,10 @@ def test_compile_redundant_jumps_and_nops_after_moving_cold_blocks(self):
# make all instruction locations the same to create redundancies
for node in ast.walk(tree):
if hasattr(node,"lineno"):
del node.lineno
del node.end_lineno
del node.col_offset
del node.end_col_offset
del node.lineno
del node.end_lineno
del node.col_offset
del node.end_col_offset

compile(ast.fix_missing_locations(tree), "<file>", "exec")

Expand All @@ -564,10 +564,10 @@ def test_compile_redundant_jump_after_convert_pseudo_ops(self):
# make all instruction locations the same to create redundancies
for node in ast.walk(tree):
if hasattr(node,"lineno"):
del node.lineno
del node.end_lineno
del node.col_offset
del node.end_col_offset
del node.lineno
del node.end_lineno
del node.col_offset
del node.end_col_offset

compile(ast.fix_missing_locations(tree), "<file>", "exec")

Expand Down
6 changes: 3 additions & 3 deletions Lib/test/test_ctypes/test_bitfields.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def test_signed(self):
for c_typ in signed_int_types:
with self.subTest(c_typ):
if sizeof(c_typ) != alignment(c_typ):
self.skipTest('assumes size=alignment')
self.skipTest('assumes size=alignment')
class X(Structure):
_fields_ = [("dummy", c_typ),
("a", c_typ, 3),
Expand All @@ -173,7 +173,7 @@ def test_unsigned(self):
for c_typ in unsigned_int_types:
with self.subTest(c_typ):
if sizeof(c_typ) != alignment(c_typ):
self.skipTest('assumes size=alignment')
self.skipTest('assumes size=alignment')
class X(Structure):
_fields_ = [("a", c_typ, 3),
("b", c_typ, 3),
Expand Down Expand Up @@ -229,7 +229,7 @@ def test_single_bitfield_size(self):
for c_typ in int_types:
with self.subTest(c_typ):
if sizeof(c_typ) != alignment(c_typ):
self.skipTest('assumes size=alignment')
self.skipTest('assumes size=alignment')
result = self.fail_fields(("a", c_typ, -1))
self.assertEqual(result, (ValueError,
"number of bits invalid for bit field 'a'"))
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_ctypes/test_generated_structs.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ def dump_ctype(tp, struct_or_union_tag='', variable_name='', semi=''):

def struct_or_union(cls):
if issubclass(cls, Structure):
return 'struct'
return 'struct'
if issubclass(cls, Union):
return 'union'
raise TypeError(cls)
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -7472,7 +7472,7 @@ def test_no_generator_instantiation(self):

def test_async_generator(self):
async def f():
yield 42
yield 42
g = f()
self.assertIsSubclass(type(g), typing.AsyncGenerator)

Expand Down
3 changes: 0 additions & 3 deletions Lib/test/tokenizedata/coding20731.py
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
#coding:latin1



Loading