Skip to content

Commit fc118b4

Browse files
committed
refactor!: Move libvcs.util -> libvcs.cmd.core
1 parent 1b5d869 commit fc118b4

File tree

9 files changed

+9
-9
lines changed

9 files changed

+9
-9
lines changed

docs/states/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ See examples below of git, mercurial, and subversion.
4545
## Utility stuff
4646

4747
```{eval-rst}
48-
.. automodule:: libvcs.util
48+
.. automodule:: libvcs.cmd.core
4949
:members:
5050
```

libvcs/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
"""Repo package for libvcs."""
22
import logging
33

4+
from .cmd.core import RepoLoggingAdapter
45
from .states.base import BaseRepo
56
from .states.git import GitRepo
67
from .states.hg import MercurialRepo
78
from .states.svn import SubversionRepo
8-
from .util import RepoLoggingAdapter
99

1010
__all__ = [
1111
"GitRepo",

libvcs/util.py renamed to libvcs/cmd/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import subprocess
77
import sys
88

9-
from . import exc
9+
from .. import exc
1010

1111
logger = logging.getLogger(__name__)
1212

libvcs/states/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from typing import NamedTuple
55
from urllib import parse as urlparse
66

7-
from ..util import RepoLoggingAdapter, mkdir_p, run
7+
from libvcs.cmd.core import RepoLoggingAdapter, mkdir_p, run
88

99
logger = logging.getLogger(__name__)
1010

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
import pytest
77

8+
from libvcs.cmd.core import run
89
from libvcs.shortcuts import create_repo_from_pip_url
9-
from libvcs.util import run
1010

1111

1212
@pytest.fixture(autouse=True, scope="session")

tests/states/test_git.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from pytest_mock import MockerFixture
1212

1313
from libvcs import exc
14+
from libvcs.cmd.core import run, which
1415
from libvcs.shortcuts import create_repo_from_pip_url
1516
from libvcs.states.git import (
1617
FullRemoteDict,
@@ -19,7 +20,6 @@
1920
convert_pip_url as git_convert_pip_url,
2021
extract_status,
2122
)
22-
from libvcs.util import run, which
2323

2424
if not which("git"):
2525
pytestmark = pytest.mark.skip(reason="git is not available")

tests/states/test_hg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
import pytest
77

8+
from libvcs.cmd.core import run, which
89
from libvcs.shortcuts import create_repo, create_repo_from_pip_url
9-
from libvcs.util import run, which
1010

1111
if not which("hg"):
1212
pytestmark = pytest.mark.skip(reason="hg is not available")

tests/states/test_svn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
import pytest
66

7+
from libvcs.cmd.core import run, which
78
from libvcs.shortcuts import create_repo_from_pip_url
8-
from libvcs.util import run, which
99

1010
if not which("svn"):
1111
pytestmark = pytest.mark.skip(reason="svn is not available")

tests/test_util.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import pytest
44

5-
from libvcs.util import mkdir_p, which
5+
from libvcs.cmd.core import mkdir_p, which
66

77

88
def test_mkdir_p(tmp_path: pathlib.Path):

0 commit comments

Comments
 (0)