@@ -304,7 +304,7 @@ Higher level analysis
304304 passing ``independent=False `` when instantiating the :class: `.Layer `. For convenience, if a layer consists
305305 only of one module name then a string may be passed in place of the :class: `.Layer ` object. Additionally, if
306306 the layer consists of multiple *independent * modules, that can be passed as a set of strings instead of a
307- :class: `.Layer ` object.
307+ :class: `.Layer ` object. A closed layer may be created by passing `` open=False `` (see below).
308308 *Any modules specified that don't exist in the graph will be silently ignored. *
309309 :param set[str] containers: The parent modules of the layers, as absolute names that you could
310310 import, such as ``mypackage.foo ``. (Optional.)
@@ -409,6 +409,14 @@ Higher level analysis
409409 ),
410410 )
411411
412+ Closed layers
413+ ^^^^^^^^^^^^^
414+
415+ A closed layer may be created by passing ``open=False ``. Imports from higher to lower
416+ layers cannot bypass closed layers - the closed layer must be included in the import
417+ chain. For example, given the layers high -> mid (closed) -> low then all import chains
418+ from high -> low must go via mid.
419+
412420 Return value
413421 ^^^^^^^^^^^^
414422
@@ -575,4 +583,4 @@ Module expressions
575583 - ``mypackage.foo* ``: is not a valid expression. (The wildcard must replace a whole module name.)
576584
577585.. _namespace packages : https://docs.python.org/3/glossary.html#term-namespace-package
578- .. _namespace portion : https://docs.python.org/3/glossary.html#term-portion
586+ .. _namespace portion : https://docs.python.org/3/glossary.html#term-portion
0 commit comments