blob: 42940ad59d844213af587e0d68139f0a804bee32 (
plain)
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
61
62
63
64
65
66
67
68
|
# Copyright (c) 2015-2016 Claudiu Popa <pcmanticore@gmail.com>
# Licensed under the LGPL: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
# For details: https://github.com/PyCQA/astroid/blob/master/COPYING.LESSER
import abc
import six
@six.add_metaclass(abc.ABCMeta)
class RuntimeObject(object):
"""Class representing an object that is created at runtime
These objects aren't AST per se, being created by the action
of the interpreter when the code executes, which is a total
different step than the AST creation.
"""
class Instance(RuntimeObject):
"""Class representing an instance."""
class ExceptionInstance(Instance):
pass
class BuiltinInstance(RuntimeObject):
"""Represents an instance of a builtin."""
class Method(RuntimeObject):
"""Base class for methods."""
class UnboundMethod(Method):
"""Class representing an unbound method."""
class BoundMethod(Method):
"""Class representing a bound method."""
class Generator(RuntimeObject):
"""Class representing a Generator."""
class Super(RuntimeObject):
"""Class representing a super proxy."""
class FrozenSet(RuntimeObject):
"""Class representing a frozenset."""
class DictKeys(RuntimeObject):
"""The class of {}.keys."""
class DictValues(RuntimeObject):
"""The class of {}.values."""
class DictItems(RuntimeObject):
"""The class of {}.items()."""
|