(self, version: tuple)
| 39 | |
| 40 | |
| 41 | def customize_for_version36(self, version: tuple): |
| 42 | # fmt: off |
| 43 | PRECEDENCE["call_kw"] = 0 |
| 44 | PRECEDENCE["call_kw36"] = 1 |
| 45 | PRECEDENCE["call_ex"] = 1 |
| 46 | PRECEDENCE["call_ex_kw"] = 1 |
| 47 | PRECEDENCE["call_ex_kw2"] = 1 |
| 48 | PRECEDENCE["call_ex_kw3"] = 1 |
| 49 | PRECEDENCE["call_ex_kw4"] = 1 |
| 50 | PRECEDENCE["dict_pack"] = 0 # **{ ... } |
| 51 | PRECEDENCE["formatted_value1"] = 100 |
| 52 | |
| 53 | self.TABLE_DIRECT.update( |
| 54 | { |
| 55 | "ann_assign_init_value": ( |
| 56 | "%|%c = %p\n", |
| 57 | (-1, "store_annotation"), |
| 58 | (0, "expr", 200), |
| 59 | ), |
| 60 | "ann_assign_no_init": ("%|%c\n", (0, "store_annotation")), |
| 61 | "async_for_stmt36": ( |
| 62 | "%|async for %c in %c:\n%+%c%-\n\n", |
| 63 | (9, "store"), |
| 64 | (1, "expr"), |
| 65 | # Count from end, since COME_FROM shifts things in the forward direction |
| 66 | (-9, ("for_block", "pass")), |
| 67 | ), |
| 68 | "async_forelse_stmt36": ( |
| 69 | "%|async for %c in %c:\n%+%c%-%|else:\n%+%c%-\n\n", |
| 70 | (9, "store"), |
| 71 | (1, "expr"), |
| 72 | (-10, "for_block"), |
| 73 | (-2, "else_suite"), |
| 74 | ), |
| 75 | "call_ex": ("%c(%p)", (0, "expr"), (1, 100)), |
| 76 | "except_return": ("%|except:\n%+%c%-", 3), |
| 77 | "func_args36": ("%c(**", 0), |
| 78 | |
| 79 | # This comes from 3.7. Eventually we will rebase from 3.7 |
| 80 | # and then this can go away |
| 81 | "if_exp37": ("%p if %c else %c", (1, "expr", 27), 0, 3), |
| 82 | |
| 83 | "ifstmtl": ("%|if %c:\n%+%c%-", |
| 84 | (0, "testexpr"), (1, "_ifstmts_jumpl")), |
| 85 | |
| 86 | "list_afor": ( |
| 87 | " async for %[1]{%c} in %c%[1]{%c}", |
| 88 | (1, "store"), (0, "get_aiter"), (3, "list_iter"), |
| 89 | ), |
| 90 | |
| 91 | "try_except36": ("%|try:\n%+%c%-%c\n\n", 1, -2), |
| 92 | "tryfinally36": ("%|try:\n%+%c%-%|finally:\n%+%c%-\n\n", (1, "returns"), 3), |
| 93 | "tryfinally_return_stmt": ("%|try:\n%+%c%-%|finally:\n%+%|return%-\n\n", 1), |
| 94 | "unpack_list": ("*%c", (0, "list")), |
| 95 | "store_annotation": ("%[1]{pattr}: %c", 0), |
| 96 | } |
| 97 | ) |
| 98 |
no outgoing calls
no test coverage detected