We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f9ff34e commit cfc6f3fCopy full SHA for cfc6f3f
client/commands/v2/pysa_server.py
@@ -91,9 +91,14 @@ def invalid_models_to_diagnostics(
91
) -> Dict[Path, List[lsp.Diagnostic]]:
92
result: Dict[Path, List[lsp.Diagnostic]] = {}
93
for model in invalid_models:
94
- result.setdefault(Path(model.path), []).append(
95
- self.invalid_model_to_diagnostic(model)
96
- )
+ if model.path is None:
+ self.log_and_show_message_to_client(
+ "Path cannot be None", lsp.MessageType.WARNING
97
+ )
98
+ else:
99
+ result.setdefault(Path(model.path), []).append(
100
+ self.invalid_model_to_diagnostic(model)
101
102
return result
103
104
async def update_errors(self, document_path: Path) -> None:
0 commit comments