Skip to content

Commit e535a1a

Browse files
authored
Merge pull request #192 from sjkelly/sjk/misc1
A few random cleanups
2 parents 4866259 + 2767e8f commit e535a1a

File tree

6 files changed

+12
-10
lines changed

6 files changed

+12
-10
lines changed

Project.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
2424
YAML = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6"
2525

2626
[compat]
27+
Aqua = "0.6"
2728
CodecZlib = "0.6, 0.7"
2829
DashBase = "0.1"
2930
DashCoreComponents = "2.0.0"
@@ -40,7 +41,8 @@ YAML = "0.4.7"
4041
julia = "1.6"
4142

4243
[extras]
44+
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
4345
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
4446

4547
[targets]
46-
test = ["Test"]
48+
test = ["Aqua", "Test"]

src/Dash.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ include("HttpHelpers/HttpHelpers.jl")
1313

1414
using .HttpHelpers
1515

16-
export dash, Component, Front, callback!,
16+
export dash, Component, callback!,
1717
enable_dev_tools!, ClientsideFunction,
1818
run_server, PreventUpdate, no_update, @var_str,
1919
Input, Output, State, make_handler, callback_context,

src/app/dashapp.jl

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ end
4242

4343
#only name, index_string and layout are available to set
4444
function Base.setproperty!(app::DashApp, property::Symbol, value)
45-
property == :name && return set_name!(app, value)
4645
property == :index_string && return set_index_string!(app, value)
4746
property == :layout && return set_layout!(app::DashApp, value)
4847
property == :title && return set_title!(app::DashApp, value)
@@ -52,16 +51,10 @@ function Base.setproperty!(app::DashApp, property::Symbol, value)
5251
error("The property `$(property)` of `DashApp` does not exist.")
5352
end
5453

55-
function set_name!(app::DashApp, name)
56-
setfield!(app, :name, name)
57-
end
58-
5954
function set_title!(app::DashApp, title)
6055
setfield!(app, :title, title)
6156
end
6257

63-
get_name(app::DashApp) = app.name
64-
6558
function set_layout!(app::DashApp, component::Union{Component,Function})
6659
setfield!(app, :layout, component)
6760
end

src/components_utils/table_format.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module TableFormat
44

55
struct NamedValue{Name, T}
66
value::T
7-
NamedValue{Name}(value::T) where {Name, Keys, T} = new{Name, T}(value)
7+
NamedValue{Name}(value::T) where {Name, T} = new{Name, T}(value)
88
end
99

1010
struct TupleWithNamedValues{Name, Keys}

test/aqua.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
using Aqua
2+
3+
# ideally we get both these tests to work, but:
4+
# stale_deps is ignored to help transition from DashCoreComponents
5+
# amiguities is ignored because they originate outside the package
6+
Aqua.test_all(Dash; ambiguities=false, stale_deps=false)

test/runtests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ include("callbacks.jl")
1212
include("components_utils.jl")
1313
include("table_format.jl")
1414
include("reload_hash.jl")
15+
include("aqua.jl")
1516
#include("dev.jl")

0 commit comments

Comments
 (0)