Skip to content

Commit 5919f40

Browse files
committed
Don't use hy.reserved
I intend to remove it from Hy soon.
1 parent 49b4b7c commit 5919f40

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

sphinxcontrib/hy_documenters.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import builtins
12
import logging
23
import re
34
import traceback
@@ -7,7 +8,6 @@
78

89
import hy
910
import hy.core.macros
10-
import hy.reserved as reserved
1111
from docutils.nodes import Node
1212
from sphinx.ext.autodoc import ALL
1313
from sphinx.ext.autodoc import AttributeDocumenter as PyAttributeDocumenter
@@ -390,7 +390,6 @@ def get_module_members(module: Any):
390390
members = {}
391391
macros = safe_getattr(module, "_hy_macros", {})
392392
is_core_module = "hy.core" in module.__name__
393-
reserved_hy_names = reserved.names()
394393

395394
for name in dir(module):
396395
try:
@@ -403,8 +402,8 @@ def get_module_members(module: Any):
403402
for name, value in macros.items():
404403
try:
405404
setattr(value, "_hy_macro", True)
406-
name = hy.unmangle(name)
407-
if name not in reserved_hy_names or is_core_module:
405+
if name not in builtins._hy_macros or is_core_module:
406+
name = hy.unmangle(name)
408407
members[name] = (name, value)
409408
except AttributeError:
410409
continue

0 commit comments

Comments
 (0)