gootsaud / bike-riding

Protected member accessed from outside the class PYL-W0212
Bug risk
Minor
a year agoa year old
Access to a protected member _undefined_message of a client class
 979
 980    def _log_message(undef: Undefined) -> None:
 981        logger.warning(  # type: ignore
 982            "Template variable warning: %s", undef._undefined_message 983        )
 984
 985    class LoggingUndefined(base):  # type: ignore
Access to a protected member _files of a client class
383            )
384            offset = len(prefix)
385
386            for name in self._loader._files.keys():  # type: ignore387                # Find names under the templates directory that aren't directories.
388                if name.startswith(prefix) and name[-1] != os.path.sep:
389                    results.append(name[offset:].replace(os.path.sep, "/"))
Access to a protected member _fail_with_undefined_error of a client class
 503
 504            if isinstance(name, Undefined):
 505                try:
 506                    name._fail_with_undefined_error() 507                except Exception as e:
 508                    msg = f"{msg} ({e}; did you forget to quote the callable name?)"
 509
Access to a protected member _fail_with_undefined_error of a client class
1032        .. versionadded:: 2.3
1033        """
1034        if isinstance(names, Undefined):
1035            names._fail_with_undefined_error()1036
1037        if not names:
1038            raise TemplatesNotFound(