This is an another possible fix for #14033 building on @A4-Tacks work in #14048.
This is a work in progress.
https://github.com/vim/vim/pull/14057
(33 files)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@dkearns pushed 1 commit.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@dkearns pushed 1 commit.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@dkearns pushed 1 commit.
—
View it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
I ran some automated syntax testing of this PR against Python-3.12.2/Lib and it doesn't appear to brake anything.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
It looks broken on the following code:
import logging import os from typing import Any def git_runner(*args: Any, **kwargs: Any) -> str: "nothing" return str(*args, **kwargs) GIT_PREFIX = "git" def commit_push_staged(pr_info: Any) -> None: "nothing" # It works ONLY for PRs, and only over ssh, so either # ROBOT_CLICKHOUSE_SSH_KEY should be set or ssh-agent should work assert pr_info.number if not pr_info.head_name == pr_info.base_name: # We can't push to forks, sorry folks return git_staged = git_runner("git diff --cached --name-only") if not git_staged: logging.info("No fixes are staged") return def push_fix() -> None: """ Stash staged changes to commit them on the top of the PR's head. `pull_request` event runs on top of a temporary merge_commit, we need to avoid including it in the autofix """ remote_url = pr_info.event["pull_request"]["base"]["repo"]["ssh_url"] head = pr_info.sha git_runner(f"{GIT_PREFIX} commit -m 'Automatic style fix'") fix_commit = git_runner("git rev-parse HEAD") logging.info( "Fetching PR's head, check it out and cherry-pick autofix: %s", head ) git_runner( f"{GIT_PREFIX} fetch {remote_url} --no-recurse-submodules --depth=1 {head}" ) git_runner(f"git reset --hard {head}") git_runner(f"{GIT_PREFIX} cherry-pick {fix_commit}") git_runner(f"{GIT_PREFIX} push {remote_url} HEAD:{pr_info.head_ref}") if os.getenv("ROBOT_CLICKHOUSE_SSH_KEY", ""): push_fix() return push_fix()
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
You need to run it as a replacement for the distributed file, not applied additionally in your ~/.vim/after/syntax/ directory. So, just place it in ~/.vim/syntax (unedited).
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
@dkearns pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
Installed the latest version from 21c6d8b as curl -s https://raw.githubusercontent.com/vim/vim/21c6d8b5b6ef510c9c78b9dfb89a41146599505f/runtime/syntax/python.vim > ~/.vim/syntax/python.vim, and it looks good. Thanks!
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
VAR = ( "placeholderplaceholderplaceholderplaceholderplaceholderplaceholderplaceholder" if not bool() else f"placeholder {bool()}" ) if not VAR: logging.debug("placeholder") _ = VAR
Another broken code. The closing curly brace there {bool()} is "unrelated" to the opening one.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
WFM. Assuming you removed ~/.vim/after/syntax/python.vim are there any other custom syntax commands being applied?
The parens after bool shouldn't be highlighted either.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Yes, it looks to be broken together with https://github.com/luochen1990/rainbow
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Yes, it looks to be broken together with https://github.com/luochen1990/rainbow
Replied here: luochen1990/rainbow#198
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()