(module=None, name=None)
| 78 | return name |
| 79 | |
| 80 | def getSection(module=None, name=None): |
| 81 | if module is None: |
| 82 | path = getTarget().executable.fullpath |
| 83 | module = getTarget().module[path] |
| 84 | |
| 85 | if isinstance(module, str): |
| 86 | module = getTarget().module[module] |
| 87 | if module is None: |
| 88 | return None |
| 89 | |
| 90 | if isinstance(module, int): |
| 91 | module = getTarget().modules[module] |
| 92 | if module is None: |
| 93 | return None |
| 94 | |
| 95 | if name is None: |
| 96 | return module.sections |
| 97 | |
| 98 | sections = name.split('.') |
| 99 | index = 0 |
| 100 | if len(sections) == 0: |
| 101 | return None |
| 102 | section = module.FindSection(sections[0]) |
| 103 | if name == section.name: |
| 104 | return section |
| 105 | while index < len(sections): |
| 106 | name = sections[index] |
| 107 | for subsec in section: |
| 108 | if sections[index] in subsec.name: |
| 109 | section = subsec |
| 110 | if sections[-1] in subsec.name: |
| 111 | return subsec |
| 112 | continue |
| 113 | index += 1 |
| 114 | return None |
| 115 | |
| 116 | def create_or_touch_filepath(filepath, contents): |
| 117 | file = open(filepath, "w") |
nothing calls this directly
no test coverage detected
searching dependent graphs…