1
0

🤖 Repository layout updated to latest Python version

This commit was automatically generated by a script: https://gitfub.space/Jmaa/python-omni
This commit is contained in:
Jon Michael Aanes 2024-06-03 22:37:41 +02:00
parent 200f4efc59
commit 71996735e1

View File

@ -15,6 +15,7 @@ PACKAGE_NAME = 'requests_util'
with open('README.md') as f:
readme = f.read()
def parse_version_file(text: str) -> str:
match = re.match(r'^__version__\s*=\s*(["\'])([\d\.]+)\1$', text)
if match is None:
@ -22,9 +23,11 @@ def parse_version_file(text: str) -> str:
raise Exception(msg)
return match.group(2)
with open(PACKAGE_NAME + '/_version.py') as f:
version = parse_version_file(f.read())
def parse_requirements(text: str) -> list[str]:
return text.strip().split('\n')