custom_components.py 876 B

12345678910111213141516171819202122232425
  1. """Constants for the custom components."""
  2. from __future__ import annotations
  3. from pathlib import Path
  4. from types import SimpleNamespace
  5. class CustomComponents(SimpleNamespace):
  6. """Constants for the custom components."""
  7. # The name of the custom components source directory.
  8. SRC_DIR = Path("src")
  9. # The name of the custom components pyproject.toml file.
  10. PYPROJECT_TOML = Path("pyproject.toml")
  11. # The name of the custom components package README file.
  12. PACKAGE_README = Path("README.md")
  13. # The name of the distribution directory as result of a build.
  14. DIST_DIR = "dist"
  15. # The name of the init file.
  16. INIT_FILE = "__init__.py"
  17. # The .gitignore file for the custom component project.
  18. GITIGNORE_PATH = Path(".gitignore")
  19. # Files to gitignore.
  20. GITIGNORE_DEFAULTS = {"__pycache__/", "*.py[cod]", "*.egg-info/", "dist/"}