(
inproject: bool, group: str = "scrapy.commands"
)
| 61 | |
| 62 | |
| 63 | def _get_commands_from_entry_points( |
| 64 | inproject: bool, group: str = "scrapy.commands" |
| 65 | ) -> dict[str, ScrapyCommand]: |
| 66 | cmds: dict[str, ScrapyCommand] = {} |
| 67 | for entry_point in entry_points(group=group): |
| 68 | obj = entry_point.load() |
| 69 | if inspect.isclass(obj): |
| 70 | cmds[entry_point.name] = obj() |
| 71 | else: |
| 72 | raise ValueError(f"Invalid entry point {entry_point.name}") |
| 73 | return cmds |
| 74 | |
| 75 | |
| 76 | def _get_commands_dict( |
no test coverage detected