Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Jameson Nash <vtjnash@gmail.com>
  • Loading branch information
timholy and vtjnash committed Jul 25, 2021
1 parent b215082 commit 0aab0dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion stdlib/REPL/src/REPL.jl
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ LineEditREPL(t::TextTerminal, hascolor::Bool, envcolors::Bool=false) =
)

mutable struct REPLCompletionProvider <: CompletionProvider
modifier::Symbol
shift::Bool
end
REPLCompletionProvider() = REPLCompletionProvider(:none)
mutable struct ShellCompletionProvider <: CompletionProvider end
Expand Down
6 changes: 3 additions & 3 deletions stdlib/REPL/src/REPLCompletions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -504,16 +504,16 @@ function complete_any_methods(ex_org::Expr, callee_module::Module, context_modul
end

for name in names(callee_module; all=true)
if isdefined(callee_module, name)
if !isdeprecated(callee_module, name) && isdefined(callee_module, name)
func = getfield(callee_module, name)
if isa(func, Base.Callable) && func !== Vararg
if !isa(func, Module)
complete_methods!(out, func, args_ex, kwargs_ex, moreargs)
elseif callee_module === Main::Module && isa(func, Module)
callee_module2 = func
for name in names(callee_module2)
if isdefined(callee_module2, name)
func = getfield(callee_module, name)
if isa(func, Base.Callable) && func !== Vararg
if isa(func, Base.Callable)
complete_methods!(out, func, args_ex, kwargs_ex, moreargs)
end
end
Expand Down

0 comments on commit 0aab0dc

Please sign in to comment.