Files
Grinch-AP/worlds/_sc2common/bot/__init__.py
Ziktofel ce2433b247 SC2: Python 3.11 compatibility (#1821)
Co-authored-by: Salzkorn
2023-06-12 07:41:53 +02:00

17 lines
349 B
Python

from pathlib import Path
from loguru import logger
def is_submodule(path):
if path.is_file():
return path.suffix == ".py" and path.stem != "__init__"
if path.is_dir():
return (path / "__init__.py").exists()
return False
__all__ = [p.stem for p in Path(__file__).parent.iterdir() if is_submodule(p)]
logger = logger