Flatten a Nix ``attrpath`` node into a list of identifier parts. ``packages.default`` → ``["packages", "default"]``; ``inputs.nixpkgs.url`` → ``["inputs", "nixpkgs", "url"]``. Dotted attrpaths have ``identifier`` children separated by ``.`` tokens.
(self, attrpath_node)
| 2646 | return Path(file_path).name == "flake.nix" |
| 2647 | |
| 2648 | def _nix_attrpath_parts(self, attrpath_node) -> list[str]: |
| 2649 | """Flatten a Nix ``attrpath`` node into a list of identifier parts. |
| 2650 | |
| 2651 | ``packages.default`` → ``["packages", "default"]``; |
| 2652 | ``inputs.nixpkgs.url`` → ``["inputs", "nixpkgs", "url"]``. Dotted |
| 2653 | attrpaths have ``identifier`` children separated by ``.`` tokens. |
| 2654 | """ |
| 2655 | parts: list[str] = [] |
| 2656 | for child in attrpath_node.children: |
| 2657 | if child.type == "identifier": |
| 2658 | parts.append(child.text.decode("utf-8", errors="replace")) |
| 2659 | return parts |
| 2660 | |
| 2661 | def _extract_nix_flake_input_urls( |
| 2662 | self, attrset_node, |
no outgoing calls
no test coverage detected