Skip to content

Commit b88af23

Browse files
committed
Mis spelling corrections
1 parent daf54d2 commit b88af23

File tree

8 files changed

+16
-18
lines changed

8 files changed

+16
-18
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
/dist
1818
/how-to-make-a-release.txt
1919
/nose-*.egg
20+
/pycharm-venv
2021
/tmp
2122
/uncompyle6.egg-info
2223
/unpyc

uncompyle6/parsers/parse38.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ def p_38_stmt(self, args):
8080
JUMP_BACK COME_FROM_FINALLY
8181
END_ASYNC_FOR
8282
83-
# FIXME: come froms after the else_suite or END_ASYNC_FOR distinguish which of
84-
# for / forelse is used. Add come froms and check of add up control-flow detection phase.
83+
# FIXME: "come_froms" after the "else_suite" or END_ASYNC_FOR distinguish which of
84+
# for / forelse is used. Add "come_froms" and check of add up control-flow detection phase.
8585
async_forelse_stmt38 ::= expr
8686
GET_AITER
8787
SETUP_FINALLY

uncompyle6/parsers/reducecheck/for_block_check.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55

66
def for_block_invalid(self, lhs, n, rule, tree, tokens, first: int, last: int) -> bool:
7-
87
# print("XXX", first, last)
98
# for t in range(first, last):
109
# print(tokens[t])
@@ -51,8 +50,8 @@ def for_block_invalid(self, lhs, n, rule, tree, tokens, first: int, last: int) -
5150
pop_jump_index -= 1
5251

5352
# FIXME: something is fishy when and EXTENDED ARG is needed before the
54-
# pop_jump_index instruction to get the argment. In this case, the
55-
# _ifsmtst_jump can jump to a spot beyond the come_froms.
53+
# pop_jump_index instruction to get the argument. In this case, the
54+
# _ifsmtst_jump can jump to a spot beyond the ``come_froms``.
5655
# That is going on in the non-EXTENDED_ARG case is that the POP_JUMP_IF
5756
# jumps to a JUMP_(FORWARD) which is changed into an EXTENDED_ARG POP_JUMP_IF
5857
# to the jumped forwarded address

uncompyle6/parsers/reducecheck/ifelsestmt2.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444

4545

4646
def ifelsestmt2(self, lhs, n, rule, tree, tokens, first, last):
47-
4847
if (last + 1) < n and tokens[last + 1] == "COME_FROM_LOOP" and lhs != "ifelsestmtc":
4948
# ifelsestmt jumped outside of loop. No good.
5049
return True
@@ -66,7 +65,7 @@ def ifelsestmt2(self, lhs, n, rule, tree, tokens, first, last):
6665
if raise_stmt1 == "raise_stmt1" and raise_stmt1[0] in ("LOAD_ASSERT",):
6766
return True
6867

69-
# Make sure all of the "come froms" offset at the
68+
# Make sure all of the "come_froms" offset at the
7069
# end of the "if" come from somewhere inside the "if".
7170
# Since the come_froms are ordered so that lowest
7271
# offset COME_FROM is last, it is sufficient to test

uncompyle6/parsers/reducecheck/ifstmts_jump.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55

66
def ifstmts_jump(self, lhs, n, rule, ast, tokens, first, last):
7-
87
if len(rule[1]) <= 1 or not ast:
98
return False
109

@@ -24,7 +23,7 @@ def ifstmts_jump(self, lhs, n, rule, ast, tokens, first, last):
2423
pop_jump_index -= 1
2524

2625
# FIXME: something is fishy when and EXTENDED ARG is needed before the
27-
# pop_jump_index instruction to get the argment. In this case, the
26+
# pop_jump_index instruction to get the argument. In this case, the
2827
# _ifsmtst_jump can jump to a spot beyond the come_froms.
2928
# That is going on in the non-EXTENDED_ARG case is that the POP_JUMP_IF
3029
# jumps to a JUMP_(FORWARD) which is changed into an EXTENDED_ARG POP_JUMP_IF
@@ -34,16 +33,11 @@ def ifstmts_jump(self, lhs, n, rule, ast, tokens, first, last):
3433

3534
pop_jump_offset = tokens[pop_jump_index].off2int(prefer_last=False)
3635
if isinstance(come_froms, Token):
37-
if (
38-
tokens[pop_jump_index].attr < pop_jump_offset and ast[0] != "pass"
39-
):
36+
if tokens[pop_jump_index].attr < pop_jump_offset and ast[0] != "pass":
4037
# This is a jump backwards to a loop. All bets are off here when there the
4138
# unless statement is "pass" which has no instructions associated with it.
4239
return False
43-
return (
44-
come_froms.attr is not None
45-
and pop_jump_offset > come_froms.attr
46-
)
40+
return come_froms.attr is not None and pop_jump_offset > come_froms.attr
4741

4842
elif len(come_froms) == 0:
4943
return False

uncompyle6/scanners/scanner37base.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,13 @@ def __init__(
5454
super(Scanner37Base, self).__init__(version, show_asm, is_pypy)
5555
self.offset2tok_index = None
5656
self.debug = debug
57+
58+
# True is code is from PyPy
5759
self.is_pypy = is_pypy
5860

61+
# Bytecode converted into instruction
62+
self.insts = []
63+
5964
# Create opcode classification sets
6065
# Note: super initialization above initializes self.opc
6166

uncompyle6/semantics/gencomp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,7 @@ def comprehension_walk_newer(
471471
assert store, "Couldn't find store in list/set comprehension"
472472

473473
# A problem created with later Python code generation is that there
474-
# is a lamda set up with a dummy argument name that is then called
474+
# is a lambda set up with a dummy argument name that is then called
475475
# So we can't just translate that as is but need to replace the
476476
# dummy name. Below we are picking out the variable name as seen
477477
# in the code. And trying to generate code for the other parts

uncompyle6/semantics/make_function2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def build_param(ast, name, default):
4343
- handle defaults
4444
- handle format tuple parameters
4545
"""
46-
# if formal parameter is a tuple, the paramater name
46+
# if formal parameter is a tuple, the parameter name
4747
# starts with a dot (eg. '.1', '.2')
4848
if name.startswith("."):
4949
# replace the name with the tuple-string

0 commit comments

Comments
 (0)