Skip to content

Commit

Permalink
fix: project root was identifing the tests folder as a project root d…
Browse files Browse the repository at this point in the history
…ue to __init__.py
  • Loading branch information
taylorn01 committed Jun 7, 2024
1 parent 1dc6714 commit 6a0ba1f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion act.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,13 @@ def _get_arches_project_name(root: Path):
for submodule in root.glob("*/__init__.py"):
if project_name:
raise RuntimeError("There should be exactly one Python package in the project root!")
project_name = str(submodule.parent.parts[-1])
name = str(submodule.parent.parts[-1])
if name in ['tests']:
continue
project_name = name
if not project_name:
raise RuntimeError("Could not find a Python project in the project root!")

return project_name

def __init__(self, root):
Expand Down

0 comments on commit 6a0ba1f

Please sign in to comment.