Skip to content

Commit

Permalink
dot devenv
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuarli committed Mar 18, 2024
1 parent 3b27f12 commit f8e346b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion devenv/doctor.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def load_checks(context: Dict[str, str], match_tags: set[str]) -> List[Check]:
"""
checks: list[Check] = []
for module_finder, module_name, _ in walk_packages(
(f'{context["reporoot"]}/devenv/checks',)
(f'{context["reporoot"]}/.devenv/checks',)
):
module_spec = module_finder.find_spec(module_name, None)

Expand Down
2 changes: 1 addition & 1 deletion devenv/lib/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@functools.lru_cache(maxsize=None)
def get_repo(reporoot: str) -> configparser.ConfigParser:
config = configparser.ConfigParser()
config.read(f"{reporoot}/devenv/config.ini")
config.read(f"{reporoot}/.devenv/config.ini")
return config


Expand Down
6 changes: 3 additions & 3 deletions devenv/sync.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
def main(context: Dict[str, str], argv: Sequence[str] | None = None) -> int:
reporoot = context["reporoot"]

if not os.path.exists(f"{reporoot}/devenv/sync.py"):
print(f"{reporoot}/devenv/sync.py not found!")
if not os.path.exists(f"{reporoot}/.devenv/sync.py"):
print(f"{reporoot}/.devenv/sync.py not found!")
return 1

spec = importlib.util.spec_from_file_location(
"sync", f"{reporoot}/devenv/sync.py"
"sync", f"{reporoot}/.devenv/sync.py"
)
module = importlib.util.module_from_spec(spec) # type: ignore
spec.loader.exec_module(module) # type: ignore
Expand Down
4 changes: 2 additions & 2 deletions tests/lib/test_venv.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@

def test_get_ensure(tmp_path: pathlib.Path) -> None:
reporoot = f"{tmp_path}/ops"
os.makedirs(f"{reporoot}/devenv")
with open(f"{reporoot}/devenv/config.ini", "w") as f:
os.makedirs(f"{reporoot}/.devenv")
with open(f"{reporoot}/.devenv/config.ini", "w") as f:
f.write(mock_config)

venv_dir, python_version, requirements, editable_paths, bins = venv.get(
Expand Down

0 comments on commit f8e346b

Please sign in to comment.