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
104
105
# |version| and |release|, also used in various other places throughout the
105
106
# built documents.
106
107
#
107
- # The short X.Y version.
108
-
109
- version = ""
110
- with open ("../disnake/__init__.py" ) as f :
111
- version = re .search (r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]' , f .read (), re .MULTILINE ).group (1 ) # type: ignore
112
-
113
108
# The full version, including alpha/beta/rc tags.
114
- release = version
109
+ release = importlib .metadata .version ("disnake" )
110
+ # The short X.Y version.
111
+ version = "." .join (release .split ("." )[:2 ])
115
112
116
113
117
114
_IS_READTHEDOCS = bool (os .getenv ("READTHEDOCS" ))
You can’t perform that action at this time.
0 commit comments