From a93c0cbdf7b2e92d68038db3b59718ab2a15c8c2 Mon Sep 17 00:00:00 2001 From: Claude Code Date: Wed, 7 Jan 2026 09:12:00 -0500 Subject: [PATCH] Improve explicit imports hygiene MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Changed imports to explicit form in src/DimensionalPlotRecipes.jl - `using RecipesBase` → `using RecipesBase: RecipesBase, @recipe` - `using LinearAlgebra` → `using LinearAlgebra: LinearAlgebra, norm` - Added ExplicitImports.jl tests to test suite - Added test/explicit_imports.jl with tests for import hygiene - Added ExplicitImports to [extras] and [targets] in Project.toml - All tests pass including new ExplicitImports checks 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 --- Project.toml | 3 ++- src/DimensionalPlotRecipes.jl | 4 ++-- test/explicit_imports.jl | 8 ++++++++ test/runtests.jl | 3 +++ 4 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 test/explicit_imports.jl diff --git a/Project.toml b/Project.toml index 4c15a7b..25af0b1 100644 --- a/Project.toml +++ b/Project.toml @@ -12,8 +12,9 @@ RecipesBase = "0.7, 0.8, 1.0" julia = "1.6" [extras] +ExplicitImports = "7d51a73a-1435-4ff3-83d9-f097790105c7" Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["Test", "Plots"] +test = ["ExplicitImports", "Plots", "Test"] diff --git a/src/DimensionalPlotRecipes.jl b/src/DimensionalPlotRecipes.jl index 57df725..679266e 100644 --- a/src/DimensionalPlotRecipes.jl +++ b/src/DimensionalPlotRecipes.jl @@ -1,7 +1,7 @@ module DimensionalPlotRecipes -using RecipesBase -using LinearAlgebra +using RecipesBase: RecipesBase, @recipe +using LinearAlgebra: LinearAlgebra, norm # Splits a complex matrix to its real and complex parts # Reals defaults solid, imaginary defaults dashed diff --git a/test/explicit_imports.jl b/test/explicit_imports.jl new file mode 100644 index 0000000..d2d7400 --- /dev/null +++ b/test/explicit_imports.jl @@ -0,0 +1,8 @@ +using ExplicitImports +using DimensionalPlotRecipes +using Test + +@testset "ExplicitImports" begin + @test check_no_implicit_imports(DimensionalPlotRecipes) === nothing + @test check_no_stale_explicit_imports(DimensionalPlotRecipes) === nothing +end diff --git a/test/runtests.jl b/test/runtests.jl index 2a775d5..c4388bd 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,5 +1,8 @@ using DimensionalPlotRecipes, Test +# Test explicit imports hygiene +include("explicit_imports.jl") + A = rand(5, 2) .+ im .* rand(5, 2) t = range(0, stop = 1, length = 5)