@@ -52,7 +52,6 @@ def __init__(
5252 log .debug ("Running `%s`" , " " .join (shlex .quote (arg ) for arg in command ))
5353
5454 self ._proc = subprocess .Popen (command , stdout = subprocess .PIPE )
55- self ._collected = collections .Counter ()
5655
5756 # For unambiguous prefix match: add trailing slash, sort by longest path first.
5857 self ._source_locations = sorted (
@@ -96,29 +95,7 @@ def collect(self, identifier: str, config: Mapping[str, Any]) -> "DocView":
9695 item = self .root
9796 if identifier != "::" :
9897 item = item .lookup (identifier )
99- view = DocView (item , config )
100- if isinstance (item , DocType ):
101- self ._collected .update ((item ,))
102- self ._collected .update (view .walk_types ())
103- else :
104- self ._collected .setdefault (item .parent , 0 )
105-
106- return view
107-
108- def teardown (self ):
109- if log .isEnabledFor (logging .DEBUG ):
110- mul_collected = ", " .join (
111- typ .abs_id for typ in self .root .walk_types () if self ._collected [typ ] > 1
112- )
113- if mul_collected :
114- log .debug (
115- f"These types were put into the documentation more than once: { mul_collected } "
116- )
117- not_collected = ", " .join (
118- typ .abs_id for typ in self .root .walk_types () if typ not in self ._collected
119- )
120- if not_collected :
121- log .debug (f"These types were never put into the documentation: { not_collected } " )
98+ return DocView (item , config )
12299
123100
124101@dataclasses .dataclass
0 commit comments