push
github
59 of 135 new or added lines in 9 files covered. (43.7%)
529 of 686 relevant lines covered (77.11%)
0.77 hits per line
| 1 |
# SPDX-License-Identifier: GPL-2.0+
|
|
| 2 |
|
|
|
|
from . import procedures
|
1✔ |
| 4 |
|
|
| 5 |
|
|
| 6 |
class namespace: |
1✔ |
|
|
def __init__(self, namespace, *, version): |
1✔ |
|
NEW
|
self._namespace = namespace
|
× |
|
NEW
|
self.version = version
|
× |
| 10 |
|
|
|
|
@property
|
1✔ |
|
|
def ref(self): |
1✔ |
|
NEW
|
return int(self._namespace) |
× |
| 14 |
|
|
| 15 |
|
|
| 16 |
class derived_ns: |
1✔ |
|
|
def __init__(self, derives_ns, *, version): |
1✔ |
|
NEW
|
self._dns = derives_ns
|
× |
|
NEW
|
self.version = version
|
× |
| 20 |
|
|
|
NEW
|
self._proc = None |
× |
| 22 |
|
|
|
|
def __bool__(self): |
1✔ |
|
NEW
|
return len(self._dns) > 0 |
× |
| 25 |
|
|
|
|
@property
|
1✔ |
|
|
def unknown(self): |
1✔ |
|
NEW
|
return self._dns[0] |
× |
| 29 |
|
|
|
|
@property
|
1✔ |
|
|
def proc(self): |
1✔ |
|
NEW
|
if self._proc is None and self: |
× |
|
NEW
|
self._proc = []
|
× |
|
NEW
|
for i in self._dns[1:]: |
× |
|
NEW
|
self._proc.append(procedures.typebound_proc(i, version=self.version)) |
× |
| 36 |
|
|
|
NEW
|
return self._proc |
× |