| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 67a74cd commit 54b2b2b
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,6 +5,13 @@ | |||
| 5 | 5 | ||
| 6 | 6 | from .utils import DataClassType, LaxMapping, SQLAlchemyClassType, env_true, isatty | |
| 7 | 7 | ||
| 8 | + try: | ||
| 9 | + from functools import cache | ||
| 10 | + except ImportError: | ||
| 11 | + from functools import lru_cache | ||
| 12 | + | ||
| 13 | + cache = lru_cache() | ||
| 14 | + | ||
| 8 | 15 | __all__ = 'PrettyFormat', 'pformat', 'pprint' | |
| 9 | 16 | MYPY = False | |
| 10 | 17 | if MYPY: | |
@@ -28,6 +35,7 @@ class SkipPretty(Exception): | |||
| 28 | 35 | pass | |
| 29 | 36 | ||
| 30 | 37 | ||
| 38 | + @cache | ||
| 31 | 39 | def get_pygments(): | |
| 32 | 40 | try: | |
| 33 | 41 | import pygments | |
| Back | FazBrowse Home | New Git URL |
0 commit comments