@@ -459,7 +459,7 @@ function keywords(func, m::Method)
459
459
if ! (Base. fieldindex (Core. MethodTable, :kwsorter , false ) > 0 ) || isdefined (table, :kwsorter )
460
460
# Fetching method keywords stolen from base/replutil.jl:572-576 (commit 3b45cdc9aab0):
461
461
kwargs = VERSION < v " 1.4.0-DEV.215" ? Base. kwarg_decl (m, typeof (table. kwsorter)) : Base. kwarg_decl (m)
462
- if isa (kwargs, Vector) && length (kwargs) > 0
462
+ if isa (kwargs, Vector) && length (kwargs) > 0 && kwargs != [: ... ] # in julia 1.10 sometimes kwargs is `[:...]`, ignore that
463
463
filter! (arg -> ! occursin (" #" , string (arg)), kwargs)
464
464
# Keywords *may* not be sorted correctly. We move the vararg one to the end.
465
465
index = findfirst (arg -> endswith (string (arg), " ..." ), kwargs)
@@ -519,50 +519,9 @@ $(:SIGNATURES)
519
519
520
520
Get the URL (file and line number) where a method `m` is defined.
521
521
522
- Note that this is based on the implementation of `Base.url`, but handles URLs correctly
523
- on TravisCI as well.
522
+ Note that this is `Base.url`.
524
523
"""
525
- url (m:: Method ) = url (m. module, string (m. file), m. line)
526
-
527
- function url (mod:: Module , file:: AbstractString , line:: Integer )
528
- file = Sys. iswindows () ? replace (file, ' \\ ' => ' /' ) : file
529
- if Base. inbase (mod) && ! isabspath (file)
530
- local base = " https://github.com/JuliaLang/julia/tree"
531
- if isempty (Base. GIT_VERSION_INFO. commit)
532
- return " $base /v$VERSION /base/$file #L$line "
533
- else
534
- local commit = Base. GIT_VERSION_INFO. commit
535
- return " $base /$commit /base/$file #L$line "
536
- end
537
- else
538
- if isfile (file)
539
- local d = dirname (file)
540
- try # might not be in a git repo
541
- LibGit2. with (LibGit2. GitRepoExt (d)) do repo
542
- LibGit2. with (LibGit2. GitConfig (repo)) do cfg
543
- local u = LibGit2. get (cfg, " remote.origin.url" , " " )
544
- local m = match (LibGit2. GITHUB_REGEX, u)
545
- u = m === nothing ? get (ENV , " TRAVIS_REPO_SLUG" , " " ) : m. captures[1 ]
546
- local commit = string (LibGit2. head_oid (repo))
547
- local root = LibGit2. path (repo)
548
- if startswith (file, root) || startswith (realpath (file), root)
549
- local base = " https://github.com/$u /tree"
550
- local filename = file[(length (root) + 1 ): end ]
551
- return " $base /$commit /$filename #L$line "
552
- else
553
- return " "
554
- end
555
- end
556
- end
557
- catch err
558
- isa (err, LibGit2. GitError) || rethrow ()
559
- return " "
560
- end
561
- else
562
- return " "
563
- end
564
- end
565
- end
524
+ url (m:: Method ) = Base. url (m)
566
525
567
526
# This is compat to make sure that we have ismutabletype available pre-1.7.
568
527
# Implementation borrowed from JuliaLang/julia (MIT license).
0 commit comments