Skip to content

Commit e1adc6c

Browse files
Replace toml with tomli for TOML v1 support (#43)
* Replace toml with tomli for TOML v1 support
1 parent e42c3c2 commit e1adc6c

File tree

5 files changed

+179
-86
lines changed

5 files changed

+179
-86
lines changed

.hooks/make_release_commit.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#!/usr/bin/env python3
2-
import toml
2+
import tomli
33
import subprocess
44
from pathlib import Path
55

66
def create_release_commit():
77
cwd = Path.cwd()
8-
pyproject = toml.load(cwd / 'pyproject.toml')
8+
with open(cwd / 'pyproject.toml', 'rb') as file:
9+
pyproject = tomli.load(file)
910
version = pyproject['tool']['poetry']['version']
1011

1112
p = subprocess.Popen(f'git add . && git commit -m "Release version {version}" && git tag -a "{version}" -m "Release version {version}" && git push && git push --tags',

0 commit comments

Comments
 (0)