File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,26 +36,10 @@ know how to import those unknown types.
3636> docstub already knows about types in Python's ` typing ` or ` collections.abc `
3737> modules. That means you can just use types like ` Literal ` or ` Sequence ` .
3838
39- For now docstub's relies on users to declare unknown types[ ^ static-analysis ]
40- in a ` docstub.toml ` or ` pyproject.toml ` like this:
41- ``` toml
42- [tool .docstub .docnames ]
43- np = { import = " numpy" , as = " np" }
44- ```
45- With this declaration, you can safely use things that are available in the
46- ` numpy ` namespace. E.g. docstub will recognize that ` np.uint8 ` requires
47- ` import numpy as np ` and will include it in stub files if necessary.
48-
49- docstub uses the keys of the ` docnames ` map to match unknown names used in
50- docstrings. So
51- ``` toml
52- [tool .docstub .docnames ]
53- func = { use = " Callable" , from = " typing" }
54- ```
55- will allow using ` func ` as a synonym for ` Callable ` .
56-
57- [ ^ static-analysis ] : Static and possibly runtime analysis to automatically find
58- unknown types is on the roadmap.
39+ While docstub is smart enough to find some types via static analysis of
40+ definitions in the given source directory, it must be told about other types
41+ for now. To do so, refer to the syntax and comments in the
42+ ` default_config.toml ` .
5943
6044
6145## Contributing
You can’t perform that action at this time.
0 commit comments