mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-17 13:58:37 +00:00
[ty] Add flow diagram for import resolution
The diagram is written in the Dot language, which can be converted to SVG (or any other image) by GraphViz. I thought it was a good idea to write this down in preparation for adding routines that list modules. Code reuse is likely to be difficult and I wanted to be sure I understood how it worked.
This commit is contained in:
parent
941be52358
commit
88a679945c
3 changed files with 447 additions and 0 deletions
|
@ -1,3 +1,13 @@
|
|||
/*!
|
||||
This module principally provides two routines for resolving a particular module
|
||||
name to a `Module`: [`resolve_module`] and [`resolve_real_module`]. You'll
|
||||
usually want the former, unless you're certain you want to forbid stubs, in
|
||||
which case, use the latter.
|
||||
|
||||
For implementors, see `import-resolution-diagram.svg` for a flow diagram that
|
||||
specifies ty's implementation of Python's import resolution algorithm.
|
||||
*/
|
||||
|
||||
use std::borrow::Cow;
|
||||
use std::fmt;
|
||||
use std::iter::FusedIterator;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue