Skip to content

Commit 33c4b1b

Browse files
authored
fix inappropriate deprecation warnings when checking for sub-modules (#41)
1 parent 939b865 commit 33c4b1b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/utils.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ Maybe{T} = Union{T,Nothing}
33
issubmodule(m::Module, s) = s isa Module && parentmodule(s) == m && m != s
44

55
function submodules(m::Module)
6-
symbols = Core.eval.(Ref(m), filter!(y -> isdefined(m, y), names(m, all=true)))
6+
nms = filter!(names(m, all=true)) do y
7+
Base.isdefined(m, y) && !Base.isdeprecated(m, y)
8+
end
9+
symbols = Core.eval.(Ref(m), nms)
710
filter!(x -> issubmodule(m, x), symbols)
811
end
912

0 commit comments

Comments
 (0)