Skip to content

Commit

Permalink
fix: remove LiteralString, use Any for fixing issue on Python 3.10
Browse files Browse the repository at this point in the history
Closed #45
  • Loading branch information
jellydn committed Feb 2, 2024
1 parent 467c55e commit b68c352
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rplugin/python3/copilot-plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


@pynvim.plugin
class CopilotAgentPlugin(object):
class CopilotPlugin(object):
def __init__(self, nvim: pynvim.Nvim):
self.nvim: MyNvim = MyNvim(nvim, PLUGIN_MAPPING_CMD, PLUGIN_AUTOCMD_CMD)
self.vsplit_chat_handler = None
Expand Down
4 changes: 2 additions & 2 deletions rplugin/python3/mypynvim/core/buffer.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

from typing import TYPE_CHECKING, Any, Callable, Dict, LiteralString, Union
from typing import TYPE_CHECKING, Any, Callable, Dict, Union

from pynvim.api import Buffer

Expand Down Expand Up @@ -65,7 +65,7 @@ def lines(
def clear(self):
self.nvim.api.buf_set_lines(self.buf.handle, 0, -1, True, [])

def append(self, lines: list[str] | list[LiteralString]):
def append(self, lines: list[str] | list[Any]):
self.nvim.api.buf_set_lines(self.buf.handle, -1, -1, True, lines)

# extmark methods
Expand Down

0 comments on commit b68c352

Please sign in to comment.