Convert path to absolute; but to relative in bazel mode. (Bazel's distributed cache doesn't like filesystem metadata to end up in output files.)
(path: str, options: Options)
| 584 | |
| 585 | |
| 586 | def normpath(path: str, options: Options) -> str: |
| 587 | """Convert path to absolute; but to relative in bazel mode. |
| 588 | |
| 589 | (Bazel's distributed cache doesn't like filesystem metadata to |
| 590 | end up in output files.) |
| 591 | """ |
| 592 | # TODO: Could we always use relpath? (A worry in non-bazel |
| 593 | # mode would be that a moved file may change its full module |
| 594 | # name without changing its size, mtime or hash.) |
| 595 | if options.bazel: |
| 596 | return os.path.relpath(path) |
| 597 | else: |
| 598 | return os.path.abspath(path) |
| 599 | |
| 600 | |
| 601 | # NOTE: dependencies + suppressed == all reachable imports; |
no outgoing calls
no test coverage detected
searching dependent graphs…