Skip to content

Commit 8715f69

Browse files
Update tests and docs to use Val syntax for accepted_kwargs
All test files and documentation now use the recommended Val((:kwarg,)) syntax instead of plain tuples. This eliminates deprecation warnings and demonstrates best practices. Updated files: - test/scalar.jl: Updated ScalarOperator test with Val((:dtgamma,)) - test/total.jl: Updated MatrixOperator and DiagonalOperator tests - docs/src/interface.md: Updated example to use Val syntax All tests pass with no deprecation warnings. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent aa2545d commit 8715f69

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

docs/src/interface.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ using SciMLOperators
6767
6868
γ = ScalarOperator(0.0;
6969
update_func = (a, u, p, t; my_special_scaling) -> my_special_scaling,
70-
accepted_kwargs = (:my_special_scaling,))
70+
accepted_kwargs = Val((:my_special_scaling,)))
7171
7272
# Update coefficients, then apply operator
7373
update_coefficients!(γ, nothing, nothing, nothing; my_special_scaling = 7.0)

test/scalar.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ end
224224

225225
# Test with keyword arguments
226226
γ = ScalarOperator(0.0; update_func = (args...; dtgamma) -> dtgamma,
227-
accepted_kwargs = (:dtgamma,))
227+
accepted_kwargs = Val((:dtgamma,)))
228228

229229
dtgamma = rand()
230230
# Original tests

test/total.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ end
103103
# Introduce update function for D dependent on kwarg "matrix"
104104
D = MatrixOperator(zeros(N, N);
105105
update_func! = (A, u, p, t; matrix) -> (A .= p * t * matrix),
106-
accepted_kwargs = (:matrix,))
106+
accepted_kwargs = Val((:matrix,)))
107107

108108
matrix = rand(N, N)
109109
diag = rand(N2)
@@ -116,7 +116,7 @@ end
116116
D1 = DiagonalOperator(zeros(N2); update_func! = (d, u, p, t) -> d .= p)
117117
D2 = DiagonalOperator(
118118
zeros(N2); update_func! = (d, u, p, t; diag) -> d .= p * t * diag,
119-
accepted_kwargs = (:diag,))
119+
accepted_kwargs = Val((:diag,)))
120120

121121
TT = [T1, T2]
122122
DD = Diagonal([D1, D2])

0 commit comments

Comments
 (0)