File: parser.py

package info (click to toggle)
python-jedi 0.10.0~git1%2Bf05c071-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,064 kB
  • ctags: 3,014
  • sloc: python: 16,997; makefile: 149; ansic: 13
file content (43 lines) | stat: -rw-r--r-- 744 bytes parent folder | download | duplicates (2)
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
"""
Issues with the parser and not the type inference should be part of this file.
"""

class IndentIssues():
    """
    issue jedi-vim#288
    Which is really a fast parser issue. It used to start a new block at the
    parentheses, because it had problems with the indentation.
    """
    def one_param(
        self,
    ):
        return 1

    def with_param(
        self,
    y):
        return y



#? int()
IndentIssues().one_param()

#? str()
IndentIssues().with_param('')


"""
Just because there's a def keyword, doesn't mean it should not be able to
complete to definition.
"""
definition = 0
#? ['definition']
str(def


# It might be hard to determine the context
class Foo(object):
    @property
    #? ['str']
    def bar(str