8 Star 0 Fork 30

src-openEuler/krb5

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-Fix-Python-regexp-literals.patch 1.53 KB
一键复制 编辑 原始数据 按行查看 历史
From 4b21b2e2821d3cb91042be09e0ebe09707a57d72 Mon Sep 17 00:00:00 2001
From: Arjun <[email protected]>
Date: Thu, 9 May 2024 20:47:08 +0530
Subject: [PATCH] Fix Python regexp literals
Add missing "r" prefixes before literals using regexp escape
sequences.
[[email protected]: split into separate commit; rewrote commit message]
Reference: https://github.com/krb5/krb5/commit/4b21b2e2821d3cb91042be09e0ebe09707a57d72
Conflict: NA
---
src/util/cstyle-file.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/util/cstyle-file.py b/src/util/cstyle-file.py
index 837fa05..56b1e32 100644
--- a/src/util/cstyle-file.py
+++ b/src/util/cstyle-file.py
@@ -208,7 +208,7 @@ def check_assignment_in_conditional(line, ln):
def indent(line):
- return len(re.match('\s*', line).group(0).expandtabs())
+ return len(re.match(r'\s*', line).group(0).expandtabs())
def check_unbraced_flow_body(line, ln, lines):
@@ -220,8 +220,8 @@ def check_unbraced_flow_body(line, ln, lines):
if m and (m.group(1) is None) != (m.group(3) is None):
warn(ln, 'One arm of if/else statement braced but not the other')
- if (re.match('\s*(if|else if|for|while)\s*\(.*\)$', line) or
- re.match('\s*else$', line)):
+ if (re.match(r'\s*(if|else if|for|while)\s*\(.*\)$', line) or
+ re.match(r'\s*else$', line)):
base = indent(line)
# Look at the next two lines (ln is 1-based so lines[ln] is next).
if indent(lines[ln]) > base and indent(lines[ln + 1]) > base:
--
2.33.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/krb5.git
[email protected]:src-openeuler/krb5.git
src-openeuler
krb5
krb5
master

搜索帮助