Skip to content

Commit 261dfc0

Browse files
committed
refactor: update version retrieval to use importlib.metadata
1 parent b8f443b commit 261dfc0

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

appium/version.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,14 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
version = '6.0.0'
15+
from importlib import metadata
16+
17+
18+
def _get_version():
19+
try:
20+
return metadata.version('Appium-Python-Client')
21+
except metadata.PackageNotFoundError:
22+
return 'unknown'
23+
24+
25+
version = _get_version()

0 commit comments

Comments
 (0)