-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolve a bunch of issues reported by JET #950
Conversation
Codecov Report
@@ Coverage Diff @@
## master #950 +/- ##
=======================================
Coverage 75.70% 75.70%
=======================================
Files 51 51
Lines 4169 4169
=======================================
Hits 3156 3156
Misses 1013 1013
|
src/adapter.jl
Outdated
join(lines[(end-rows+upper+2):end], "\n") | ||
stri = join(lines[1:upper], "\n")::String | ||
stri *= "\n ⋮\n" | ||
stri *= join(lines[(end-rows+upper+2):end], "\n")::String |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not understand why the old code was problematic:
Doesn't the documentation of join
say that a String
is returned?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've dropped this for now until I understand it properly.
@@ -254,7 +254,7 @@ function BitVector(obj::GapObj) | |||
!Wrappers.IsBlist(obj) && throw(ConversionError(obj, BitVector)) | |||
# TODO: a much better conversion would be possible, at least if `obj` is | |||
# in IsBlistRep, then we could essentially memcpy data | |||
len = Wrappers.Length(obj) | |||
len = Wrappers.Length(obj)::Int |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I have learned something:
Wrappers.Length
defines its return type to be just GapInt
(for example because there are infinite lists), but here we know more.
Thus it is worth to think about type annotations also for functions defined in Wrappers
.
Specifically I used using JET, GAP ; report_package(GAP) There are some remaining warnings; however, those related to `Downloads.download` and to `REPL.REPLCompletions.completions` seem to be issues in those stdlibs, not in our code.
Specifically I used
using JET, GAP ; report_package(GAP)
There are some remaining warnings; however, those related to
Downloads.download
and toREPL.REPLCompletions.completions
seem to be issues in those stdlibs, not in our code.