Detect all preferences from file content.
(cls, content: str)
| 207 | |
| 208 | @classmethod |
| 209 | def detect_all_preferences(cls, content: str) -> Dict[str, str]: |
| 210 | """Detect all preferences from file content.""" |
| 211 | return { |
| 212 | "test_framework": cls.detect_test_framework(content), |
| 213 | "code_style": cls.detect_code_style(content), |
| 214 | "naming_convention": cls.detect_naming_convention(content), |
| 215 | "import_style": cls.detect_import_style(content), |
| 216 | "type_hints": cls.detect_type_hints(content), |
| 217 | "async_style": cls.detect_async_style(content), |
| 218 | "http_library": cls.detect_preferred_library(content, cls.HTTP_LIBS, "http_library"), |
| 219 | "cli_library": cls.detect_preferred_library(content, cls.CLI_LIBS, "cli_library"), |
| 220 | "log_style": cls.detect_log_style(content), |
| 221 | } |
| 222 | |
| 223 | |
| 224 | class PreferenceManager: |