Commit f23aa206 authored by YdrMaster's avatar YdrMaster
Browse files

issue/63/style: 整理格式,修正格式整理脚本的错误


Signed-off-by: default avatarYdrMaster <ydrml@hotmail.com>
parent f7137096
...@@ -91,7 +91,7 @@ def git_added_files(): ...@@ -91,7 +91,7 @@ def git_added_files():
try: try:
# 使用 git diff --cached --name-only 获取所有已添加到暂存区的文件 # 使用 git diff --cached --name-only 获取所有已添加到暂存区的文件
result = subprocess.run( result = subprocess.run(
["git", "diff", "--cached", "--name-only"], ["git", "diff", "--cached", "--diff-filter=AMR", "--name-only"],
capture_output=True, capture_output=True,
text=True, text=True,
check=True, check=True,
...@@ -162,7 +162,7 @@ def main(): ...@@ -162,7 +162,7 @@ def main():
if args.ref is None and args.path is None: if args.ref is None and args.path is None:
# Last commit. # Last commit.
print("{Fore.GREEN}Formating git added files.{Style.RESET_ALL}") print(f"{Fore.GREEN}Formating git added files.{Style.RESET_ALL}")
files = git_added_files() files = git_added_files()
else: else:
......
#include "infiniop/operator.h" #include "infiniop/operator.h"
infiniopStatus_t infiniopGetDescriptorDeviceType(InfiniopDescriptor const *desc_ptr, infiniDevice_t *device_type) { infiniopStatus_t infiniopGetDescriptorDeviceType(
InfiniopDescriptor const *desc_ptr,
infiniDevice_t *device_type) {
*device_type = desc_ptr->device_type; *device_type = desc_ptr->device_type;
return INFINIOP_STATUS_SUCCESS; return INFINIOP_STATUS_SUCCESS;
} }
infiniopStatus_t infiniopGetDescriptorDeviceId(InfiniopDescriptor const *desc_ptr, int *device_id) { infiniopStatus_t infiniopGetDescriptorDeviceId(
InfiniopDescriptor const *desc_ptr,
int *device_id) {
*device_id = desc_ptr->device_id; *device_id = desc_ptr->device_id;
return INFINIOP_STATUS_SUCCESS; return INFINIOP_STATUS_SUCCESS;
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment