MCPcopy Create free account
hub / github.com/PyCQA/isort / insert

Method insert

isort/utils.py:26–37  ·  view source on GitHub ↗
(self, config_file: str, config_data: dict[str, Any])

Source from the content-addressed store, hash-verified

24 self.root: TrieNode = TrieNode(config_file, config_data)
25
26 def insert(self, config_file: str, config_data: dict[str, Any]) -> None:
27 resolved_config_path_as_tuple = Path(config_file).parent.resolve().parts
28
29 temp = self.root
30
31 for path in resolved_config_path_as_tuple:
32 if path not in temp.nodes:
33 temp.nodes[path] = TrieNode()
34
35 temp = temp.nodes[path]
36
37 temp.config_info = (config_file, config_data)
38
39 def search(self, filename: str) -> tuple[str, dict[str, Any]]:
40 """

Callers 5

find_all_configsFunction · 0.95
test_trieFunction · 0.95
file_contentsFunction · 0.80
sorted_importsFunction · 0.80
conf.pyFile · 0.80

Calls 1

TrieNodeClass · 0.85

Tested by 1

test_trieFunction · 0.76