Skip to content

Commit

Permalink
lsp: Fix mypy errors
Browse files Browse the repository at this point in the history
  • Loading branch information
alcarney committed Nov 27, 2022
1 parent 5da430e commit dbf1986
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/esbonio/changes/490.feature.rst
@@ -1,4 +1,4 @@
Add initial support for synced scrolling and live previews of HTML builds.
Add initial support for synced scrolling and live previews of HTML builds.
**Note** Both of these features rely on additional integrations outside of the LSP protocol therefore requiring dedicated support from clients.

Synced scrolling support can be enabled by setting the ``server.enableScrollSync`` initialization option to ``True`` and works by injecting line numbers into the generated HTML which a client can use to align the preview window to the source window.
Expand Down
6 changes: 3 additions & 3 deletions lib/esbonio/esbonio/lsp/sphinx/__init__.py
Expand Up @@ -101,7 +101,7 @@ def __init__(self, *args, **kwargs):
self._role_target_types: Optional[Dict[str, List[str]]] = None
"""Cache for role target types."""

self.file_list_pending_build_version_updates: List[Tuple(str, int)] = []
self.file_list_pending_build_version_updates: List[Tuple[str, int]] = []
"""List of all the files that need an updated last_build_version"""

@property
Expand Down Expand Up @@ -281,7 +281,7 @@ def cb_env_before_read_docs(self, app, env, docnames: List[str]):
uri = Uri.from_fs_path(filepath)
doc = self.workspace.get_document(uri)
current_version = doc.version or 0
self.file_list_pending_build_version_updates.append((uri, current_version))
self.file_list_pending_build_version_updates.append((uri, current_version)) # type: ignore

def cb_build_finished(self, app, exception):
"""Callback handling build-finished event."""
Expand All @@ -293,7 +293,7 @@ def cb_build_finished(self, app, exception):
doc = self.workspace.get_document(uri)
last_build_version = getattr(doc, "last_build_version", 0)
if last_build_version < updated_version:
doc.last_build_version = updated_version
doc.last_build_version = updated_version # type: ignore

self.file_list_pending_build_version_updates = []

Expand Down

0 comments on commit dbf1986

Please sign in to comment.