|
2 | 2 |
|
3 | 3 | from __future__ import annotations |
4 | 4 |
|
5 | | -import copy |
6 | 5 | import glob |
7 | 6 | import os |
8 | 7 | import posixpath |
@@ -260,9 +259,7 @@ def collect(self, identifier: str, config: Mapping[str, Any]) -> CollectorItem: |
260 | 259 | if config.get("fallback", False) and unknown_module: |
261 | 260 | raise CollectionError("Not loading additional modules during fallback") |
262 | 261 |
|
263 | | - # See: https://github.com/python/typeshed/issues/8430 |
264 | | - mutable_config = dict(copy.deepcopy(config)) |
265 | | - final_config = ChainMap(mutable_config, self.default_config) |
| 262 | + final_config = ChainMap(config, self.default_config) # type: ignore[arg-type] |
266 | 263 | parser_name = final_config["docstring_style"] |
267 | 264 | parser_options = final_config["docstring_options"] |
268 | 265 | parser = parser_name and Parser(parser_name) |
@@ -308,9 +305,7 @@ def collect(self, identifier: str, config: Mapping[str, Any]) -> CollectorItem: |
308 | 305 | return doc_object |
309 | 306 |
|
310 | 307 | def render(self, data: CollectorItem, config: Mapping[str, Any]) -> str: # noqa: D102 (ignore missing docstring) |
311 | | - # See https://github.com/python/typeshed/issues/8430 |
312 | | - mutabled_config = dict(copy.deepcopy(config)) |
313 | | - final_config = ChainMap(mutabled_config, self.default_config) |
| 308 | + final_config = ChainMap(config, self.default_config) # type: ignore[arg-type] |
314 | 309 |
|
315 | 310 | template_name = rendering.do_get_template(data) |
316 | 311 | template = self.env.get_template(template_name) |
|
0 commit comments