fresh-continent-76371
03/19/2023, 12:08 AM__init__.py files
goal: locate all directories under test folders, that don't have __init__.py files, but do have *.py files,
this is not fool-proof but it did locate the > 30 folders I had to investigate ; to remove the "pants can't infer"
(output of a test, was mostly written to a output/ subfolder (.gitignore'd) )
• read as, find directories that are "test" and have .py files, but no __init__.py files
❯ find . -type d -wholename '*/test*' -not -name __pycache__ -not -wholename '*/test/*output*' -not -wholename '*/.venv*' -exec find {} -maxdepth 1 -type f -name '*.py' -not -name 'test_*' -quit \; -not -exec test -e "{}/__init__.py" \; -print