__init__.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:announceScope 作者: ctoth 项目源码 文件源码
def script_announce_scope(self, gesture):
        info=api.getReviewPosition().copy()
        info.expand(textInfos.UNIT_LINE)
        line_text = info.text
        if not line_text:
            ui.message(_("No text found"))
            return
        char, position = find_indent(line_text)
        if position == 0:
            ui.message(_("Not indented"))
            return
        for line in previous_lines(info):
            prev_line_text = line.text
            if not prev_line_text.strip():
                continue
            new_char, new_position = find_indent(prev_line_text)
            if new_position < position:
                if new_position == 0 or new_char == char:
                    ui.message(prev_line_text)
                    return
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号