Skip to content
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

Automatic JuliaFormatter.jl run #437

Merged
merged 1 commit into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions benchmark/remotefiles.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,10 @@ julia> open(filepath/filename) do f
end
```
"""
remotefiles = [
(
"data/road.zip",
"058bdc549d0fc5bfb6deaef138e48758ca79ae20df79c2fb4c40cb878f48bfd8",
),
]
remotefiles = [(
"data/road.zip",
"058bdc549d0fc5bfb6deaef138e48758ca79ae20df79c2fb4c40cb878f48bfd8",
),]

function verify(path::AbstractString, hash::AbstractString)
@assert occursin(r"^[0-9a-f]{64}$", hash)
Expand Down
4 changes: 2 additions & 2 deletions src/ogr/feature.jl
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ nfield(feature::AbstractFeature)::Integer = GDAL.ogr_f_getfieldcount(feature)
Fetch the keys or names on this feature.
"""
function Base.keys(feature::AbstractFeature)
return (getname(getfielddefn(feature, i)) for i in 0:nfield(feature)-1)
return (getname(getfielddefn(feature, i)) for i in 0:(nfield(feature)-1))
end

"""
Expand All @@ -99,7 +99,7 @@ end
Fetch the values this feature.
"""
function Base.values(feature::AbstractFeature)
return (getfield(feature, i) for i in 0:nfield(feature)-1)
return (getfield(feature, i) for i in 0:(nfield(feature)-1))
end

"""
Expand Down
3 changes: 2 additions & 1 deletion src/tables.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ function Tables.columnnames(
end

function schema_names(featuredefn::IFeatureDefnView)
fielddefns = (getfielddefn(featuredefn, i) for i in 0:nfield(featuredefn)-1)
fielddefns =
(getfielddefn(featuredefn, i) for i in 0:(nfield(featuredefn)-1))
field_names = (Symbol(getname(fielddefn)) for fielddefn in fielddefns)
geom_names = collect(
Symbol(getname(getgeomdefn(featuredefn, i - 1))) for
Expand Down
2 changes: 1 addition & 1 deletion test/test_dataset.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const supported_vector_drivers = [

function assertsimilar(ds1, ds2)
AG.nlayer(ds1) == AG.nlayer(ds2) || error("unequal layer count")
for i in 0:AG.nlayer(ds1)-1
for i in 0:(AG.nlayer(ds1)-1)
AG.ngeom(AG.getlayer(ds1, i)) == AG.ngeom(AG.getlayer(ds2, i)) ||
error("unequal number of geometries in layer $i")
end
Expand Down
8 changes: 5 additions & 3 deletions test/test_tables.jl
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ using Tables
function clean_test_dataset_files()
for (drvshortname, file_extension) in
TEST_DS_DRIVERS_FILE_EXTENSIONS

isfile(
joinpath(
@__DIR__,
Expand Down Expand Up @@ -207,7 +208,8 @@ using Tables
multi1 = (
name = "multiline1",
geom = AG.createmultilinestring([
[(i, i + 1) for i in j:j+3] for j in 1.0:5.0:6.0
[(i, i + 1) for i in j:(j+3)] for
j in 1.0:5.0:6.0
]),
),
simple2 = (
Expand Down Expand Up @@ -417,7 +419,7 @@ using Tables
tupleoftuples_equal = (
(x, y) ->
length(x) == length(y) &&
all([all(x[i] .=== y[i]) for i in 1:length(x)])
all([all(x[i] .=== y[i]) for i in 1:length(x)])
)

"""
Expand Down Expand Up @@ -454,7 +456,7 @@ using Tables
layer = AG.getlayer(ds, 0)
return (
names = keys(Tables.columntable(layer)),
types = eltype.(values(Tables.columntable(layer)),),
types = eltype.(values(Tables.columntable(layer))),
values = wellknownvalues(
values(Tables.columntable(layer)),
),
Expand Down