From d5be23ab63a4b03964efad6e7a34e82da7e3c0a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Ch=C5=82odnicki?= Date: Fri, 10 Nov 2023 07:06:38 +0100 Subject: [PATCH] fix unsaved buffers pyright incompatibility (#2360) --- plugin/core/url.py | 2 +- tests/test_url.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/core/url.py b/plugin/core/url.py index 19f40b990..696ef9056 100644 --- a/plugin/core/url.py +++ b/plugin/core/url.py @@ -26,7 +26,7 @@ def filename_to_uri(file_name: str) -> str: def view_to_uri(view: sublime.View) -> str: file_name = view.file_name() if not file_name: - return "buffer://sublime/{}".format(view.buffer_id()) + return "buffer://{}".format(view.buffer_id()) return filename_to_uri(file_name) diff --git a/tests/test_url.py b/tests/test_url.py index d1fe885ff..532278da5 100644 --- a/tests/test_url.py +++ b/tests/test_url.py @@ -70,4 +70,4 @@ def test_buffer_uri(self): view.file_name = unittest.mock.MagicMock(return_value=None) view.buffer_id = unittest.mock.MagicMock(return_value=42) uri = view_to_uri(view) - self.assertEqual(uri, "buffer://sublime/42") + self.assertEqual(uri, "buffer://42")