Skip to content

Commit

Permalink
Use os.path.dirname like the docstring suggests (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
DMRobertson authored Jun 7, 2022
1 parent 24046e3 commit 9f3809e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/matrix_common/versionstring.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# limitations under the License.
import functools
import logging
import os.path
import subprocess
from typing import Optional

Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 9f3809e

Please sign in to comment.