(self)
| 59 | |
| 60 | @contextmanager |
| 61 | def _get_stream(self) -> Iterator[IO[str]]: |
| 62 | if self.dotenv_path and _is_file_or_fifo(self.dotenv_path): |
| 63 | with open(self.dotenv_path, encoding=self.encoding) as stream: |
| 64 | yield stream |
| 65 | elif self.stream is not None: |
| 66 | yield self.stream |
| 67 | else: |
| 68 | if self.verbose: |
| 69 | logger.info( |
| 70 | "python-dotenv could not find configuration file %s.", |
| 71 | self.dotenv_path or ".env", |
| 72 | ) |
| 73 | yield io.StringIO("") |
| 74 | |
| 75 | def dict(self) -> Dict[str, Optional[str]]: |
| 76 | """Return dotenv as dict""" |
no test coverage detected