From 487fa7b3d90d0c5e8337f21bc010064aadb1ad5f Mon Sep 17 00:00:00 2001 From: Amber's Careware Date: Thu, 18 Nov 2021 15:43:45 -0700 Subject: [PATCH] Fix script analysis warnings for release --- Pract/init.lua | 2 +- TestPract/BuiltInTester.lua | 2 +- TestPract/init.lua | 2 +- TestPract/specs/PractGlobalSystems.lua | 4 ++-- TestPract/specs/Types.lua | 2 +- TestPract/specs/combine.lua | 6 +++--- TestPract/specs/create.lua | 4 ++-- TestPract/specs/createReconciler.lua | 8 ++++---- TestPract/specs/decorate.lua | 4 ++-- TestPract/specs/index.lua | 4 ++-- TestPract/specs/portal.lua | 4 ++-- TestPract/specs/stamp.lua | 4 ++-- TestPract/specs/withContextConsumer.lua | 4 ++-- TestPract/specs/withContextProvider.lua | 4 ++-- TestPract/specs/withDeferredState.lua | 4 ++-- TestPract/specs/withLifecycle.lua | 4 ++-- TestPract/specs/withSignal.lua | 4 ++-- TestPract/specs/withState.lua | 4 ++-- 18 files changed, 35 insertions(+), 35 deletions(-) diff --git a/Pract/init.lua b/Pract/init.lua index a326003..62d8ae2 100644 --- a/Pract/init.lua +++ b/Pract/init.lua @@ -5,7 +5,7 @@ -- https://ambers-careware.github.io/pract/ local Pract = {} -Pract._VERSION = '0.9.7_indev' +Pract._VERSION = '0.9.7' local Types = require(script.Types) local PractGlobalSystems = require(script.PractGlobalSystems) diff --git a/TestPract/BuiltInTester.lua b/TestPract/BuiltInTester.lua index 70134d3..6ca4696 100644 --- a/TestPract/BuiltInTester.lua +++ b/TestPract/BuiltInTester.lua @@ -246,7 +246,7 @@ local BuiltInTester: Types.UnitTester = function( local module = modules[i] local spec local success, err: any = pcall(function() - spec = require(module) + spec = (require :: any)(module) spec(practLibraryLocation, makeDescribe(module:GetFullName())) end) if not success then diff --git a/TestPract/init.lua b/TestPract/init.lua index 7ecd8c2..d457692 100644 --- a/TestPract/init.lua +++ b/TestPract/init.lua @@ -25,7 +25,7 @@ function TestPract.Test( if _tester then tester = _tester else - tester = require(copyTestPract.BuiltInTester) + tester = (require :: any)(copyTestPract.BuiltInTester) end local modules = copyTestPract.specs:GetChildren() diff --git a/TestPract/specs/PractGlobalSystems.lua b/TestPract/specs/PractGlobalSystems.lua index b225594..401d503 100644 --- a/TestPract/specs/PractGlobalSystems.lua +++ b/TestPract/specs/PractGlobalSystems.lua @@ -3,12 +3,12 @@ local Types = require(script.Parent.Parent.Types) local spec: Types.Spec = function(practModule, describe) - local PractGlobalSystems: any = require(practModule.PractGlobalSystems) + local PractGlobalSystems = (require :: any)(practModule.PractGlobalSystems) describe('PractGlobalSystems', function(it) it('initializes by requiring the Pract module and stopping it', function(asserts) -- Global systems should run as a side effect of requiring Pract - require(practModule) + (require :: any)(practModule) PractGlobalSystems.Stop() end) diff --git a/TestPract/specs/Types.lua b/TestPract/specs/Types.lua index 6113933..75276a2 100644 --- a/TestPract/specs/Types.lua +++ b/TestPract/specs/Types.lua @@ -3,7 +3,7 @@ local Types = require(script.Parent.Parent.Types) local spec: Types.Spec = function(practModule, describe) - local Pract_Types: any = require(practModule.Types) + local Pract_Types = (require :: any)(practModule.Types) describe('Types', function(it) it('Should be nil at runtime', function(expect) diff --git a/TestPract/specs/combine.lua b/TestPract/specs/combine.lua index 9f9981d..ee28532 100644 --- a/TestPract/specs/combine.lua +++ b/TestPract/specs/combine.lua @@ -3,9 +3,9 @@ local Types = require(script.Parent.Parent.Types) local spec: Types.Spec = function(practModule, describe) - local combine: any = require(practModule.combine) - local index: any = require(practModule.index) - local Symbols: any = require(practModule.Symbols) + local combine = (require :: any)(practModule.combine) + local index = (require :: any)(practModule.index) + local Symbols = (require :: any)(practModule.Symbols) describe('combine', function(it) it('Should accept no children', function(expect) diff --git a/TestPract/specs/create.lua b/TestPract/specs/create.lua index 98b1696..5f3de85 100644 --- a/TestPract/specs/create.lua +++ b/TestPract/specs/create.lua @@ -3,8 +3,8 @@ local Types = require(script.Parent.Parent.Types) local spec: Types.Spec = function(practModule, describe) - local create: any = require(practModule.create) - local Symbols: any = require(practModule.Symbols) + local create = (require :: any)(practModule.create) + local Symbols = (require :: any)(practModule.Symbols) describe('create', function(it) it('Should create a CreateInstance element with empty props', function(expect) diff --git a/TestPract/specs/createReconciler.lua b/TestPract/specs/createReconciler.lua index 3ec03fa..8a7ad20 100644 --- a/TestPract/specs/createReconciler.lua +++ b/TestPract/specs/createReconciler.lua @@ -4,10 +4,10 @@ local Types = require(script.Parent.Parent.Types) local spec: Types.Spec = function(practModule, describe) - local PractGlobalSystems: any = require(practModule.PractGlobalSystems) - local Symbols: any = require(practModule.Symbols) - local createReconciler = require(practModule.createReconciler) - local Pract: any = require(practModule) + local PractGlobalSystems = (require :: any)(practModule.PractGlobalSystems) + local Symbols = (require :: any)(practModule.Symbols) + local createReconciler = (require :: any)(practModule.createReconciler) + local Pract = (require :: any)(practModule) local customHeartbeat = Instance.new('BindableEvent') diff --git a/TestPract/specs/decorate.lua b/TestPract/specs/decorate.lua index f007138..01df3d1 100644 --- a/TestPract/specs/decorate.lua +++ b/TestPract/specs/decorate.lua @@ -3,8 +3,8 @@ local Types = require(script.Parent.Parent.Types) local spec: Types.Spec = function(practModule, describe) - local decorate: any = require(practModule.decorate) - local Symbols: any = require(practModule.Symbols) + local decorate = (require :: any)(practModule.decorate) + local Symbols = (require :: any)(practModule.Symbols) describe('decorate', function(it) it('Should create a Decorate element with empty props', function(expect) diff --git a/TestPract/specs/index.lua b/TestPract/specs/index.lua index 88fbf8f..ffc5917 100644 --- a/TestPract/specs/index.lua +++ b/TestPract/specs/index.lua @@ -3,8 +3,8 @@ local Types = require(script.Parent.Parent.Types) local spec: Types.Spec = function(practModule, describe) - local index: any = require(practModule.index) - local Symbols: any = require(practModule.Symbols) + local index = (require :: any)(practModule.index) + local Symbols = (require :: any)(practModule.Symbols) describe('index', function(it) it('Should accept no children', function(expect) diff --git a/TestPract/specs/portal.lua b/TestPract/specs/portal.lua index 0f3d3e7..75a7fe8 100644 --- a/TestPract/specs/portal.lua +++ b/TestPract/specs/portal.lua @@ -3,8 +3,8 @@ local Types = require(script.Parent.Parent.Types) local spec: Types.Spec = function(practModule, describe) - local portal: any = require(practModule.portal) - local Symbols: any = require(practModule.Symbols) + local portal = (require :: any)(practModule.portal) + local Symbols = (require :: any)(practModule.Symbols) describe('portal', function(it) local HOST_INSTANCE = workspace diff --git a/TestPract/specs/stamp.lua b/TestPract/specs/stamp.lua index daa9f92..e0402ee 100644 --- a/TestPract/specs/stamp.lua +++ b/TestPract/specs/stamp.lua @@ -3,8 +3,8 @@ local Types = require(script.Parent.Parent.Types) local spec: Types.Spec = function(practModule, describe) - local stamp: any = require(practModule.stamp) - local Symbols: any = require(practModule.Symbols) + local stamp = (require :: any)(practModule.stamp) + local Symbols = (require :: any)(practModule.Symbols) describe('stamp', function(it) local TEMPLATE = Instance.new('Folder') diff --git a/TestPract/specs/withContextConsumer.lua b/TestPract/specs/withContextConsumer.lua index 9aeacba..b82e0ce 100644 --- a/TestPract/specs/withContextConsumer.lua +++ b/TestPract/specs/withContextConsumer.lua @@ -3,8 +3,8 @@ local Types = require(script.Parent.Parent.Types) local spec: Types.Spec = function(practModule, describe) - local withContextConsumer: any = require(practModule.withContextConsumer) - local Symbols: any = require(practModule.Symbols) + local withContextConsumer = (require :: any)(practModule.withContextConsumer) + local Symbols = (require :: any)(practModule.Symbols) describe('withContextConsumer', function(it) it('should wrap a component', function(expect) diff --git a/TestPract/specs/withContextProvider.lua b/TestPract/specs/withContextProvider.lua index 7d2aa9f..f0f07ad 100644 --- a/TestPract/specs/withContextProvider.lua +++ b/TestPract/specs/withContextProvider.lua @@ -3,8 +3,8 @@ local Types = require(script.Parent.Parent.Types) local spec: Types.Spec = function(practModule, describe) - local withContextProvider: any = require(practModule.withContextProvider) - local Symbols: any = require(practModule.Symbols) + local withContextProvider = (require :: any)(practModule.withContextProvider) + local Symbols = (require :: any)(practModule.Symbols) describe('withContextProvider', function(it) it('should wrap a component', function(expect) diff --git a/TestPract/specs/withDeferredState.lua b/TestPract/specs/withDeferredState.lua index 4d2f29b..4102c25 100644 --- a/TestPract/specs/withDeferredState.lua +++ b/TestPract/specs/withDeferredState.lua @@ -3,8 +3,8 @@ local Types = require(script.Parent.Parent.Types) local spec: Types.Spec = function(practModule, describe) - local withDeferredState: any = require(practModule.withDeferredState) - local Symbols: any = require(practModule.Symbols) + local withDeferredState = (require :: any)(practModule.withDeferredState) + local Symbols = (require :: any)(practModule.Symbols) describe('withDeferredState', function(it) it('should wrap a component', function(expect) diff --git a/TestPract/specs/withLifecycle.lua b/TestPract/specs/withLifecycle.lua index 0098a7b..4ef238f 100644 --- a/TestPract/specs/withLifecycle.lua +++ b/TestPract/specs/withLifecycle.lua @@ -3,8 +3,8 @@ local Types = require(script.Parent.Parent.Types) local spec: Types.Spec = function(practModule, describe) - local withLifecycle: any = require(practModule.withLifecycle) - local Symbols: any = require(practModule.Symbols) + local withLifecycle = (require :: any)(practModule.withLifecycle) + local Symbols = (require :: any)(practModule.Symbols) describe('withLifecycle', function(it) it('should wrap a component', function(expect) diff --git a/TestPract/specs/withSignal.lua b/TestPract/specs/withSignal.lua index 4212011..b917ce1 100644 --- a/TestPract/specs/withSignal.lua +++ b/TestPract/specs/withSignal.lua @@ -3,8 +3,8 @@ local Types = require(script.Parent.Parent.Types) local spec: Types.Spec = function(practModule, describe) - local withSignal: any = require(practModule.withSignal) - local Symbols: any = require(practModule.Symbols) + local withSignal = (require :: any)(practModule.withSignal) + local Symbols = (require :: any)(practModule.Symbols) describe('withSignal', function(it) local signal = Instance.new('BindableEvent').Event diff --git a/TestPract/specs/withState.lua b/TestPract/specs/withState.lua index 70b966a..f770c0e 100644 --- a/TestPract/specs/withState.lua +++ b/TestPract/specs/withState.lua @@ -3,8 +3,8 @@ local Types = require(script.Parent.Parent.Types) local spec: Types.Spec = function(practModule, describe) - local withState: any = require(practModule.withState) - local Symbols: any = require(practModule.Symbols) + local withState = (require :: any)(practModule.withState) + local Symbols = (require :: any)(practModule.Symbols) describe('withState', function(it) it('should wrap a component', function(expect)