Skip to content

Commit fb82452

Browse files
authored
Revert "add Printf support (#201)" (#207)
* Revert "add Printf support (#201)" This reverts commit 450defe. * Bump version from 0.7.12 to 0.7.13
1 parent f62d8d4 commit fb82452

File tree

4 files changed

+6
-52
lines changed

4 files changed

+6
-52
lines changed

Project.toml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
name = "IntervalSets"
22
uuid = "8197267c-284f-5f27-9208-e0e47529a953"
3-
version = "0.7.12"
3+
version = "0.7.13"
44

55
[deps]
66
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
77
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
88
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
99

1010
[weakdeps]
11-
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
1211
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
1312
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
1413
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
1514

1615
[extensions]
17-
IntervalSetsPrintfExt = "Printf"
1816
IntervalSetsRandomExt = "Random"
1917
IntervalSetsRecipesBaseExt = "RecipesBase"
2018
IntervalSetsStatisticsExt = "Statistics"
@@ -24,7 +22,6 @@ Aqua = "0.8"
2422
Dates = "1"
2523
OffsetArrays = "1"
2624
Plots = "1"
27-
Printf = "1"
2825
Random = "1"
2926
RecipesBase = "1"
3027
Statistics = "1"
@@ -37,12 +34,11 @@ Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
3734
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
3835
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
3936
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
40-
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
4137
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
4238
RecipesBase = "3cdcf5f2-1ef4-517c-9805-6587b60abb01"
4339
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
4440
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
4541
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d"
4642

4743
[targets]
48-
test = ["Aqua", "Dates", "Test", "Plots", "Printf", "Random", "RecipesBase", "OffsetArrays", "Statistics", "Unitful"]
44+
test = ["Aqua", "Dates", "Test", "Plots", "Random", "RecipesBase", "OffsetArrays", "Statistics", "Unitful"]

ext/IntervalSetsPrintfExt.jl

Lines changed: 0 additions & 30 deletions
This file was deleted.

src/interval.jl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,10 @@ julia> 3 ± 2
156156
±(x, y) = ClosedInterval(x - y, x + y)
157157
±(x::CartesianIndex, y::CartesianIndex) = ClosedInterval(x-y, x+y)
158158

159-
_show_suffix(::ClosedInterval) = ""
160-
_show_suffix(::OpenInterval) = " (open)"
161-
_show_suffix(::Interval{:open,:closed}) = " (open-closed)"
162-
_show_suffix(::Interval{:closed,:open}) = " (closed-open)"
163-
164-
show(io::IO, I::Interval) = print(io, leftendpoint(I), " .. ", rightendpoint(I), _show_suffix(I))
159+
show(io::IO, I::ClosedInterval) = print(io, leftendpoint(I), " .. ", rightendpoint(I))
160+
show(io::IO, I::OpenInterval) = print(io, leftendpoint(I), " .. ", rightendpoint(I), " (open)")
161+
show(io::IO, I::Interval{:open,:closed}) = print(io, leftendpoint(I), " .. ", rightendpoint(I), " (open-closed)")
162+
show(io::IO, I::Interval{:closed,:open}) = print(io, leftendpoint(I), " .. ", rightendpoint(I), " (closed-open)")
165163

166164
# The following are not typestable for mixed endpoint types
167165
_left_intersect_type(::Type{Val{:open}}, ::Type{Val{L2}}, a1, a2) where L2 = a1 < a2 ? (a2,L2) : (a1,:open)

test/runtests.jl

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import Statistics: mean
66
using Random
77
using Unitful
88
using Plots
9-
using Printf
109

1110
import IntervalSets: Domain, endpoints, closedendpoints, TypedEndpointsInterval
1211

@@ -444,15 +443,6 @@ struct IncompleteInterval <: AbstractInterval{Int} end
444443
@test_throws MethodError 2 in I
445444
end
446445

447-
VERSION v"1.9" && @testset "stringify" begin
448-
@test string(0..1) == "0 .. 1"
449-
@test string(iv"[0,1)") == "0 .. 1 (closed-open)"
450-
@test @sprintf("%d", 0..1) == "0 .. 1"
451-
@test @sprintf("%.2f", 0..1) == "0.00 .. 1.00"
452-
@test @sprintf("%.2f", iv"[0,1)") == "0.00 .. 1.00 (closed-open)"
453-
@test @sprintf("%.2f", 0u"m"..1u"m") == "0.00 m .. 1.00 m"
454-
end
455-
456446
include("base_methods.jl")
457447
include("setoperations.jl")
458448
include("findall.jl")

0 commit comments

Comments
 (0)