diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..cc1923a --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.8 diff --git a/RustEnhanced.sublime-settings b/RustEnhanced.sublime-settings index 220a33b..32305af 100644 --- a/RustEnhanced.sublime-settings +++ b/RustEnhanced.sublime-settings @@ -25,10 +25,6 @@ // Specify environment variables to add when running Cargo. // "rust_env": {"PATH": "$PATH:$HOME/.cargo/bin"} - // If true, will use the environment from the user's login shell when - // running Cargo. - "rust_include_shell_env": true, - // For errors/warnings, how to show the inline message. // "normal" - Shows the message inline. // "popup" - Show popup on mouse hover. diff --git a/dependencies.json b/dependencies.json index 0c35032..2c63c08 100644 --- a/dependencies.json +++ b/dependencies.json @@ -1,7 +1,2 @@ { - "*": { - "*": [ - "shellenv" - ] - } } diff --git a/rust/cargo_config.py b/rust/cargo_config.py index 446c45a..fadff2e 100644 --- a/rust/cargo_config.py +++ b/rust/cargo_config.py @@ -410,8 +410,8 @@ def _toolchain_list(self): # https://static.rust-lang.org/dist/index.html # (See https://github.com/rust-lang-nursery/rustup.rs/issues/215) shorthands = [] - channels = ['nightly', 'beta', 'stable', '\d\.\d{1,2}\.\d'] - pattern = '(%s)(?:-(\d{4}-\d{2}-\d{2}))?(?:-(.*))' % '|'.join(channels) + channels = ['nightly', 'beta', 'stable', r'\d\.\d{1,2}\.\d'] + pattern = r'(%s)(?:-(\d{4}-\d{2}-\d{2}))?(?:-(.*))' % '|'.join(channels) for toolchain in output: m = re.match(pattern, toolchain) # Should always match. diff --git a/rust/cargo_settings.py b/rust/cargo_settings.py index c2177c5..4f65d41 100644 --- a/rust/cargo_settings.py +++ b/rust/cargo_settings.py @@ -48,7 +48,7 @@ 'allows_release': True, 'allows_features': True, 'allows_json': True, - 'json_stop_pattern': '^\s*Running ', + 'json_stop_pattern': r'^\s*Running ', }, 'check': { 'name': 'Check', diff --git a/rust/messages.py b/rust/messages.py index 952778f..2d8d9ca 100644 --- a/rust/messages.py +++ b/rust/messages.py @@ -351,7 +351,7 @@ def message_popup(view, point, hover_zone): on_nav = functools.partial(_click_handler, view, hide_popup=True) max_width = view.em_width() * 79 _sublime_show_popup(view, minihtml, sublime.COOPERATE_WITH_AUTO_COMPLETE, - point, max_width=max_width, on_navigate=on_nav) + point, max_width=int(max_width), on_navigate=on_nav) STATUS_KEY = 'rust-msg-status' diff --git a/rust/rust_proc.py b/rust/rust_proc.py index 5177850..ba8cff9 100644 --- a/rust/rust_proc.py +++ b/rust/rust_proc.py @@ -11,7 +11,6 @@ import sys import threading import time -import shellenv import sublime import traceback @@ -191,11 +190,6 @@ def run(self, window, cmd, cwd, listener, env=None, # Configure the environment. self.env = os.environ.copy() - if util.get_setting('rust_include_shell_env', True): - global USER_SHELL_ENV - if USER_SHELL_ENV is None: - USER_SHELL_ENV = shellenv.get_env()[1] - self.env.update(USER_SHELL_ENV) rust_env = util.get_setting('rust_env') if rust_env: diff --git a/tests/test_click_handler.py b/tests/test_click_handler.py index ea996f1..e5a5d0c 100644 --- a/tests/test_click_handler.py +++ b/tests/test_click_handler.py @@ -56,8 +56,9 @@ def get_line(lineno): # Filter out just the "Accept Replacement" phantoms. click_urls = [] for phantom in phantoms: - click_urls.extend(re.findall(r'