chinus-tools 1.0.5__py3-none-any.whl → 1.0.7__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- chinus_tools/git/status.py +15 -19
- {chinus_tools-1.0.5.dist-info → chinus_tools-1.0.7.dist-info}/METADATA +1 -1
- {chinus_tools-1.0.5.dist-info → chinus_tools-1.0.7.dist-info}/RECORD +5 -5
- {chinus_tools-1.0.5.dist-info → chinus_tools-1.0.7.dist-info}/WHEEL +0 -0
- {chinus_tools-1.0.5.dist-info → chinus_tools-1.0.7.dist-info}/top_level.txt +0 -0
chinus_tools/git/status.py
CHANGED
@@ -1,24 +1,20 @@
|
|
1
1
|
import subprocess
|
2
2
|
|
3
3
|
|
4
|
-
def get_modified_items() ->
|
4
|
+
def get_modified_items() -> bool:
|
5
5
|
"""
|
6
|
-
Git 상태를 확인하여
|
7
|
-
|
8
|
-
Returns:
|
9
|
-
str: 수정된 최상위 폴더 또는 파일들의 공백으로 구분된 문자열.
|
6
|
+
Git 상태를 확인하여 변경 사항의 존재 유무에 따라 True/False를 반환합니다
|
10
7
|
"""
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
#
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
return ' '.join(sorted(modified_items))
|
8
|
+
try:
|
9
|
+
# 'git status --porcelain'으로 변경 사항이 있는지 확인
|
10
|
+
result = subprocess.run(['git', 'status', '--porcelain'], capture_output=True, text=True, check=True)
|
11
|
+
# 출력 결과가 있으면 True (변경 사항 있음), 없으면 False (변경 사항 없음)
|
12
|
+
return bool(result.stdout.strip())
|
13
|
+
except subprocess.CalledProcessError as e:
|
14
|
+
# Git 명령 실행 실패 시 예외 처리
|
15
|
+
print(f"Git 명령 실행 중 오류 발생: {e}")
|
16
|
+
return False
|
17
|
+
except FileNotFoundError:
|
18
|
+
# Git 명령이 없는 경우 예외 처리
|
19
|
+
print("Git이 설치되어 있지 않거나 경로에 없습니다.")
|
20
|
+
return False
|
@@ -1,14 +1,14 @@
|
|
1
1
|
chinus_tools/__init__.py,sha256=yD2nSKvGXbGLkQw62a173X3qfsFYvP1pAdLVpnq0yFI,483
|
2
2
|
chinus_tools/jsons.py,sha256=ULkOD-2gZxIYc8VDiCTGsSHovw2-tkE7-iZXTqESZPk,460
|
3
3
|
chinus_tools/git/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
|
-
chinus_tools/git/status.py,sha256=
|
4
|
+
chinus_tools/git/status.py,sha256=YHlVXqiCM-Le-ALX6H3KqbYNjdim-TSArH420ioJDu8,895
|
5
5
|
chinus_tools/paths/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
6
|
chinus_tools/paths/get/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
7
7
|
chinus_tools/paths/get/absolute_path.py,sha256=zzdbBUJj0yPlY0xPD_0bV0YWQ46NvW4TyRqyIz2Y6jk,291
|
8
8
|
chinus_tools/paths/get/project_root.py,sha256=eeY4NxPem9R2dGw2d-yERuCshc7p8eSaP0aQr1JDVVk,1196
|
9
9
|
chinus_tools/print_input_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
10
|
chinus_tools/print_input_utils/multi_line_io.py,sha256=MG2fIUfql3727ZjY06CSN8qGSLM01wkP5UI8wAVgp8A,158
|
11
|
-
chinus_tools-1.0.
|
12
|
-
chinus_tools-1.0.
|
13
|
-
chinus_tools-1.0.
|
14
|
-
chinus_tools-1.0.
|
11
|
+
chinus_tools-1.0.7.dist-info/METADATA,sha256=u6at9wUIV5o3XEscnc9MXtDXESC52wmD7ksVbv8Z2RY,672
|
12
|
+
chinus_tools-1.0.7.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
13
|
+
chinus_tools-1.0.7.dist-info/top_level.txt,sha256=6U_IGf0KxJr6X8UUe-ttqvfqr80YuxwB4hhtinXzO_w,13
|
14
|
+
chinus_tools-1.0.7.dist-info/RECORD,,
|
File without changes
|
File without changes
|