• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

CityOfZion / neo3-boa / e084b44c-1a5f-4649-92cd-d3ed06099181

05 Mar 2024 05:58PM UTC coverage: 92.023% (-0.08%) from 92.107%
e084b44c-1a5f-4649-92cd-d3ed06099181

push

circleci

Mirella de Medeiros
CU-86drpnc9z - Drop support to Python 3.10

20547 of 22328 relevant lines covered (92.02%)

1.84 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

93.33
/boa3/internal/model/type/classes/classinitmethoddefault.py
1
from boa3.internal import constants
2✔
2
from boa3.internal.model.identifiedsymbol import IdentifiedSymbol
2✔
3
from boa3.internal.model.method import Method
2✔
4
from boa3.internal.model.type.classes.userclass import UserClass
2✔
5
from boa3.internal.model.variable import Variable
2✔
6

7

8
class ClassInitMethod(IdentifiedSymbol, Method):
2✔
9
    def __init__(self, user_class: UserClass):
2✔
10
        self_var = Variable(user_class)
2✔
11
        args = {
2✔
12
            'self': self_var
13
        }
14
        base_init = None
2✔
15
        if len(user_class.bases) == 1:
2✔
16
            # TODO: change when class inheritance with multiple bases is implemented #2kq1gmc
17
            # use update to keep the original order
18
            base_init = user_class.bases[0].constructor_method()
2✔
19
            args.update(base_init.args)
2✔
20
            # but change the self type
21
            args['self'] = self_var
2✔
22

23
        Method.__init__(self, args=args, return_type=user_class)
2✔
24
        IdentifiedSymbol.__init__(self, identifier=constants.INIT_METHOD_ID)
2✔
25

26
        self.defined_by_entry = False
2✔
27
        self.is_init = True
2✔
28
        self.origin_class = user_class
2✔
29
        # __init__ method behave like class methods
30
        from boa3.internal.model.builtin.builtin import Builtin
2✔
31
        self.decorators.append(Builtin.ClassMethodDecorator)
2✔
32

33
        if base_init is not None:
2✔
34
            origin = self.origin if self.origin else self
2✔
35
            base_init.add_call_origin(origin)
2✔
36

37
    @property
2✔
38
    def _args_on_stack(self) -> int:
2✔
39
        return len(self.args)
×
40

41
    @property
2✔
42
    def _body(self) -> str | None:
2✔
43
        return None
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc