def __init__()

in mozci/configuration.py [0:0]


    def __init__(self, path=None):
        self.path = Path(
            path or os.environ.get("MOZCI_CONFIG_PATH") or self.DEFAULT_CONFIG_PATH
        )

        self._config = copy.deepcopy(self.DEFAULTS["merge"])
        if self.TASKCLUSTER_CONFIG_SECRET is not None:
            # Load configuration from Taskcluster
            self.merge(self.load_from_secret())
        elif self.path.is_file():
            # Load configuration from local file
            with open(self.path, "r") as fh:
                content = fh.read()
                self.merge(parse(content)["mozci"])
        else:
            logger.warning(f"Configuration path {self.path} is not a file.")

        for k, v in self.DEFAULTS["replace"].items():
            self._config.setdefault(k, v)

        self.cache = CustomCacheManager(self._config["cache"])
        self.locked = True

        # Check auto classification settings
        assert isinstance(self._config["autoclassification"]["enabled"], bool)
        assert isinstance(self._config["autoclassification"]["test-suite-names"], list)

        assert isinstance(self._config["retriggerable-backfillable-task-names"], list)