From 5977722adc6aeaf2e1a1f3eab2efdd76adfc428d Mon Sep 17 00:00:00 2001 From: Guido Cella Date: Mon, 27 May 2024 23:09:46 +0200 Subject: [PATCH] TOOLS/nan-test.lua: fix lint warnings --- .luacheckrc | 1 - TOOLS/lua/nan-test.lua | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.luacheckrc b/.luacheckrc index bdbee1c679..6ffa0dca0b 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -110,7 +110,6 @@ max_line_length = 100 -- TODO: Remove everything below this line local todo = { "player/lua/osc.lua", - "TOOLS/lua/nan-test.lua", "TOOLS/lua/observe-all.lua", "TOOLS/lua/osd-test.lua", "TOOLS/lua/status-line.lua", diff --git a/TOOLS/lua/nan-test.lua b/TOOLS/lua/nan-test.lua index d3f1c8cc8f..e08288d144 100644 --- a/TOOLS/lua/nan-test.lua +++ b/TOOLS/lua/nan-test.lua @@ -3,10 +3,10 @@ local utils = require 'mp.utils' -prop_name = "scale-param1" +local prop_name = "scale-param1" -- internal NaN, return string "default" instead of NaN -v = mp.get_property_native(prop_name, "fail") +local v = mp.get_property_native(prop_name, "fail") print("Exp:", "string", "\"default\"") print("Got:", type(v), utils.to_string(v)) @@ -25,7 +25,7 @@ print("Exp:", "number", 123) print("Got:", type(v), utils.to_string(v)) -- try to set an actual NaN -st, msg = mp.set_property_number(prop_name, 0.0/0) +local st, msg = mp.set_property_number(prop_name, 0.0/0) print("Exp:", nil, "") print("Got:", st, msg)