Skip to content

Commit

Permalink
type annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
willow-ahrens committed Dec 6, 2023
1 parent 17b6429 commit 0b10a71
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ext/HDF5Ext.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ using Finch.DataStructures

isdefined(Base, :get_extension) ? (using HDF5) : (using ..HDF5)

function Finch.bspread_h5(fname)
function Finch.bspread_h5(fname::AbstractString)
h5open(fname, "r") do io
Finch.bspread(io)
end
end

function Finch.bspwrite_h5(fname, arr, attrs = OrderedDict())
function Finch.bspwrite_h5(fname::AbstractString, arr, attrs = OrderedDict())
h5open(fname, "w") do io
Finch.bspwrite(io, arr, attrs)
end
Expand Down
4 changes: 2 additions & 2 deletions ext/NPZExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ Finch.bspwrite_header(g::NPYPath, str::String) = write(joinpath(mkpath(g.dirname
Finch.bspread_vector(g::NPYPath, key) = g[key]
Finch.bspwrite_vector(g::NPYPath, vec, key) = (g[key] = vec)

function Finch.bspread_bspnpy(fname)
function Finch.bspread_bspnpy(fname::AbstractString)
bspread(NPYPath(fname))
end

function Finch.bspwrite_bspnpy(fname, arr, attrs = OrderedDict())
function Finch.bspwrite_bspnpy(fname::AbstractString, arr, attrs = OrderedDict())
bspwrite(NPYPath(fname), arr, attrs)
fname
end
Expand Down

0 comments on commit 0b10a71

Please sign in to comment.