File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 12
12
# All configuration values have a default; values that are commented out
13
13
# serve to show the default.
14
14
15
+ import importlib .metadata
15
16
import importlib .util
16
17
import inspect
17
18
import os
106
107
# |version| and |release|, also used in various other places throughout the
107
108
# built documents.
108
109
#
109
- # The short X.Y version.
110
-
111
- version = ""
112
- with open ("../disnake/__init__.py" ) as f :
113
- version = re .search (r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]' , f .read (), re .MULTILINE ).group (1 ) # type: ignore
114
-
115
110
# The full version, including alpha/beta/rc tags.
116
- release = version
111
+ release = importlib .metadata .version ("disnake" )
112
+ # The short X.Y version.
113
+ version = "." .join (release .split ("." )[:2 ])
117
114
118
115
119
116
_IS_READTHEDOCS = bool (os .getenv ("READTHEDOCS" ))
You can’t perform that action at this time.
0 commit comments