8000 tweaks · python/cpython@0389883 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0389883

Browse files
committed
tweaks
1 parent 83d76cd commit 0389883

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

Lib/test/test_ast.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3039,15 +3039,15 @@ def test_FunctionDef(self):
30393039
def test_expr_context(self):
30403040
name = ast.Name("x")
30413041
self.assertEqual(name.id, "x")
3042-
self.assertEqual(name.ctx, ast.Load())
3042+
self.assertIsInstance(name.ctx, ast.Load)
30433043

30443044
name2 = ast.Name("x", ast.Store())
30453045
self.assertEqual(name2.id, "x")
3046-
self.assertEqual(name2.ctx, ast.Store())
3046+
self.assertIsInstance(name2.ctx, ast.Store)
30473047

30483048
name3 = ast.Name("x", ctx=ast.Del())
30493049
self.assertEqual(name3.id, "x")
3050-
self.assertEqual(name3.ctx, ast.Del())
3050+
self.assertIsInstance(name3.ctx, ast.Del)
30513051

30523052
with self.assertWarnsRegex(DeprecationWarning,
30533053
r"Name\.__init__ missing 1 required positional argument: 'id'"):

Parser/asdl_c.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1034,8 +1034,8 @@ def visitModule(self, mod):
10341034
if (PyErr_WarnFormat(
10351035
PyExc_DeprecationWarning, 1,
10361036
"%.400s.__init__ missing 1 required positional argument: '%U'. "
1037-
"This will become an error in Python 3.15. %R",
1038-
Py_TYPE(self)->tp_name, name, type
1037+
"This will become an error in Python 3.15.",
1038+
Py_TYPE(self)->tp_name, name
10391039
) < 0) {
10401040
goto set_remaining_cleanup;
10411041
}

Python/Python-ast.c

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
0