summaryrefslogtreecommitdiffstats
path: root/markdown_it/_compat.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:24:24 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:24:24 +0000
commit12e8343068b906f8b2afddc5569968a8a91fa5b0 (patch)
tree75cc5e05a4392ea0292251898f992a15a16b172b /markdown_it/_compat.py
parentInitial commit. (diff)
downloadmarkdown-it-py-upstream/2.1.0.tar.xz
markdown-it-py-upstream/2.1.0.zip
Adding upstream version 2.1.0.upstream/2.1.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'markdown_it/_compat.py')
-rw-r--r--markdown_it/_compat.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/markdown_it/_compat.py b/markdown_it/_compat.py
new file mode 100644
index 0000000..12df1aa
--- /dev/null
+++ b/markdown_it/_compat.py
@@ -0,0 +1,10 @@
+from __future__ import annotations
+
+from collections.abc import Mapping
+import sys
+from typing import Any
+
+if sys.version_info >= (3, 10):
+ DATACLASS_KWARGS: Mapping[str, Any] = {"slots": True}
+else:
+ DATACLASS_KWARGS: Mapping[str, Any] = {}