Return dictionary of styles defined in *style_dir*.
(style_dir)
| 202 | |
| 203 | |
| 204 | def _read_style_directory(style_dir): |
| 205 | """Return dictionary of styles defined in *style_dir*.""" |
| 206 | styles = dict() |
| 207 | for path in Path(style_dir).glob(f"*.{_STYLE_EXTENSION}"): |
| 208 | with warnings.catch_warnings(record=True) as warns: |
| 209 | styles[path.stem] = rc_params_from_file(path, use_default_template=False) |
| 210 | for w in warns: |
| 211 | _log.warning('In %s: %s', path, w.message) |
| 212 | return styles |
| 213 | |
| 214 | |
| 215 | @_api.deprecated("3.11") |
no test coverage detected
searching dependent graphs…