Method: pylint.pyreverse.utils.get_visibility
Calls: 596, Exceptions: 0, Paths: 4Back
Path 1: 386 calls (0.65)
'get_value' (35) 'set_value' (35) 'prop1' (19) 'prop2' (19) 'attr' (18) 'cls_member' (18) 'my_string' (17) 'my_int' (17) 'my_int_2' (17) 'do_it' (17) ...
'public' (386)
1def get_visibility(name: str) -> str:
2 """Return the visibility from a name: public, protected, private or special."""
3 if SPECIAL.match(name):
4 visibility = "special"
5 elif PRIVATE.match(name):
6 visibility = "private"
7 elif PROTECTED.match(name):
8 visibility = "protected"
9
10 else:
11 visibility = "public"
12 return visibility
Path 2: 102 calls (0.17)
'__init__' (80) '__implements__' (18) '__call__' (2) '__reduce_ex__' (1) '__setattr__' (1)
'special' (102)
1def get_visibility(name: str) -> str:
2 """Return the visibility from a name: public, protected, private or special."""
3 if SPECIAL.match(name):
4 visibility = "special"
5 elif PRIVATE.match(name):
6 visibility = "private"
7 elif PROTECTED.match(name):
8 visibility = "protected"
9
10 else:
11 visibility = "public"
12 return visibility
Path 3: 87 calls (0.15)
'_prop2' (19) '_prop1' (19) '_id' (17) '_builtin_exceptions' (1) '_check_misplaced_bare_raise' (1) '_check_bad_exception_cause' (1) '_check_raise_miss...
'protected' (87)
1def get_visibility(name: str) -> str:
2 """Return the visibility from a name: public, protected, private or special."""
3 if SPECIAL.match(name):
4 visibility = "special"
5 elif PRIVATE.match(name):
6 visibility = "private"
7 elif PROTECTED.match(name):
8 visibility = "protected"
9
10 else:
11 visibility = "public"
12 return visibility
Path 4: 21 calls (0.04)
'__value' (18) '__g_' (1) '____dsf' (1) '__23_9' (1)
'private' (21)
1def get_visibility(name: str) -> str:
2 """Return the visibility from a name: public, protected, private or special."""
3 if SPECIAL.match(name):
4 visibility = "special"
5 elif PRIVATE.match(name):
6 visibility = "private"
7 elif PROTECTED.match(name):
8 visibility = "protected"
9
10 else:
11 visibility = "public"
12 return visibility