(paths: list[str])
| 212 | |
| 213 | |
| 214 | def common_dir_prefix(paths: list[str]) -> str: |
| 215 | if not paths: |
| 216 | return "." |
| 217 | cur = os.path.dirname(os.path.normpath(paths[0])) |
| 218 | for path in paths[1:]: |
| 219 | while True: |
| 220 | path = os.path.dirname(os.path.normpath(path)) |
| 221 | if (cur + os.sep).startswith(path + os.sep): |
| 222 | cur = path |
| 223 | break |
| 224 | return cur or "." |
| 225 | |
| 226 | |
| 227 | class AnnotationPrinter(TypeStrVisitor): |
searching dependent graphs…