aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/parso/py2/tests/normalizer_issue_files/E11.py
blob: 9b97f3980c4520ab0d78cdd30c28416022c2f0ff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
if x > 2:
    #: E111:2
  hello(x)
if True:
    #: E111:5
     print
    #: E111:6
      # 
    #: E111:2
  # what
    # Comment is fine
# Comment is also fine

if False:
    pass
print
print
#: E903:0
    print
mimetype = 'application/x-directory'
#: E111:5
     # 'httpd/unix-directory'
create_date = False


def start(self):
    # foo
    #: E111:8
        # bar
    if True:  # Hello
        self.master.start()  # Comment
        # try:
        #: E111:12
            # self.master.start()
        # except MasterExit:
        #: E111:12
            # self.shutdown()
        # finally:
        #: E111:12
            # sys.exit()
    # Dedent to the first level
    #: E111:6
      # error
# Dedent to the base level
#: E111:2
  # Also wrongly indented.
# Indent is correct.


def start(self):  # Correct comment
    if True:
        #: E111:0
#       try:
        #: E111:0
#           self.master.start()
        #: E111:0
#       except MasterExit:
        #: E111:0
#           self.shutdown()
        self.master.start()  # comment