Skip to content

Conversation

@snejus
Copy link
Member

@snejus snejus commented Oct 27, 2025

Proof it works:

>>> from docs import conf

>>> conf.version
'2.1'

>>> conf.release
'2.1.0'

@snejus snejus requested review from sampsyo and semohr and removed request for sampsyo October 27, 2025 11:20

MATCH_VERSION_LINE = re.compile(r"version = \W((\d+\.\d+)\.\d.*?)\W").fullmatch

pyproject = Path(__file__).parent.parent / "pyproject.toml"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should consider using tomllib for this instead. Was only added recently in python 3.11 tho.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought so too, but did not want to add a dependency for Python < 3.11 for such a small task

@snejus snejus merged commit ac32af9 into main Oct 27, 2025
6 checks passed
@snejus snejus deleted the fix-docs branch October 27, 2025 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants