Check if a string or PythonConfig is in the module. Args: item (str or PythonConfig): The item to check. Returns: bool: True if the item is in the module, False otherwise.
(self, item: str)
| 149 | return self.module |
| 150 | |
| 151 | def __contains__(self, item: str): |
| 152 | """ |
| 153 | Check if a string or PythonConfig is in the module. |
| 154 | |
| 155 | Args: |
| 156 | item (str or PythonConfig): The item to check. |
| 157 | |
| 158 | Returns: |
| 159 | bool: True if the item is in the module, False otherwise. |
| 160 | """ |
| 161 | if not isinstance(item, str) and not isinstance(item, PythonConfig): |
| 162 | raise TypeError(f"{self.__class__.__name__} needs a string or pythonConfig") |
| 163 | if isinstance(item, str): |
| 164 | return item in self.python_complete_path |
| 165 | elif isinstance(item, PythonConfig): |
| 166 | return self.configs.filter(name=item.name).exists() |
| 167 | |
| 168 | @cached_property |
| 169 | def python_complete_path(self) -> str: |
nothing calls this directly
no outgoing calls
no test coverage detected