(self)
| 891 | return ret |
| 892 | |
| 893 | def verify_metric(self): |
| 894 | if self.fs.protocol != "local": |
| 895 | raise DvcException(f"verify metric is not supported for {self.protocol}") |
| 896 | if not self.metric: |
| 897 | return |
| 898 | |
| 899 | if not os.path.exists(self.fs_path): |
| 900 | return |
| 901 | |
| 902 | if os.path.isdir(self.fs_path): |
| 903 | msg = "directory '%s' cannot be used as %s." |
| 904 | logger.debug(msg, str(self), "metrics") |
| 905 | return |
| 906 | |
| 907 | if not istextfile(self.fs_path, self.fs): |
| 908 | raise DvcException( |
| 909 | f"binary file '{self.fs_path}' cannot be used as metrics." |
| 910 | ) |
| 911 | |
| 912 | def get_obj( |
| 913 | self, filter_info: Optional[str] = None, **kwargs |
no test coverage detected