Skip to content

Commit a4cb437

Browse files
committed
Use Pathlib instead, added .DS_Store to .gitignore
1 parent da41a51 commit a4cb437

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,4 +250,7 @@ fabric.properties
250250
.idea/httpRequests
251251

252252
# Android studio 3.1+ serialized cache file
253-
.idea/caches/build_file_checksums.ser
253+
.idea/caches/build_file_checksums.ser
254+
255+
# Mac
256+
.DS_Store

codeflash/update_license_version.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import os
22
import re
33
from datetime import datetime
4+
from pathlib import Path
45

56
from version import __version_tuple__
67

@@ -17,7 +18,7 @@ def main():
1718
version_replacement = r"\g<1>" + major_minor_version + r".x"
1819

1920
# Read the LICENSE file
20-
with open(os.path.join(os.path.dirname(__file__), "LICENSE"), encoding="utf8") as file:
21+
with (Path(__file__).parent / "LICENSE").open(encoding="utf8") as file:
2122
license_text = file.read()
2223

2324
# Replace the version in the LICENSE file
@@ -38,7 +39,7 @@ def main():
3839
updated_license_text = date_pattern.sub(date_replacement, updated_license_text)
3940

4041
# Write the updated LICENSE file
41-
with open(os.path.join(os.path.dirname(__file__), "LICENSE"), "w", encoding="utf8") as file:
42+
with open(Path(__file__).parent / "LICENSE", "w", encoding="utf8") as file:
4243
file.write(updated_license_text)
4344

4445

0 commit comments

Comments
 (0)