From 82a785c6abd711236875732a3b2acb299b8f9c33 Mon Sep 17 00:00:00 2001 From: David Robertson Date: Tue, 7 Jun 2022 11:43:28 +0100 Subject: [PATCH] Use `os.path.dirname` like the docstring suggests --- src/matrix_common/versionstring.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/matrix_common/versionstring.py b/src/matrix_common/versionstring.py index 017b65b..e31a607 100644 --- a/src/matrix_common/versionstring.py +++ b/src/matrix_common/versionstring.py @@ -14,6 +14,7 @@ # limitations under the License. import functools import logging +import os.path import subprocess from typing import Optional @@ -67,6 +68,7 @@ def get_distribution_version_string( # and 1.57. I suspect that the cause is a difference in the metadata generated # by `setuptools` and `poetry-core` at package-install time. cwd = dist.locate_file(".").__fspath__() + cwd = os.path.dirname(cwd) try: def _run_git_command(prefix: str, *params: str) -> str: