Skip to content

Commit aff88a0

Browse files
committed
Fix dependabot
1 parent 8f1777f commit aff88a0

2 files changed

Lines changed: 56 additions & 55 deletions

File tree

.github/dependabot.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
version: 2
77
updates:
8-
- package-ecosystem: "" # See documentation for possible values
9-
directory: "/" # Location of package manifests
8+
- package-ecosystem: 'npm' # See documentation for possible values
9+
directory: '/' # Location of package manifests
1010
schedule:
11-
interval: "weekly"
11+
interval: 'weekly'

src-lua/feather/lib/class.lua

Lines changed: 53 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---@diagnostic disable: undefined-global
12
--[[
23
Copyright (c) 2010-2013 Matthias Richter
34
@@ -26,80 +27,80 @@ THE SOFTWARE.
2627
--
2728

2829
local function include_helper(to, from, seen)
29-
if from == nil then
30-
return to
31-
elseif type(from) ~= "table" then
32-
return from
33-
elseif seen[from] then
34-
return seen[from]
35-
end
30+
if from == nil then
31+
return to
32+
elseif type(from) ~= "table" then
33+
return from
34+
elseif seen[from] then
35+
return seen[from]
36+
end
3637

37-
seen[from] = to
38-
for k, v in pairs(from) do
39-
k = include_helper({}, k, seen) -- keys might also be tables
40-
if to[k] == nil then
41-
to[k] = include_helper({}, v, seen)
42-
end
43-
end
44-
return to
38+
seen[from] = to
39+
for k, v in pairs(from) do
40+
k = include_helper({}, k, seen) -- keys might also be tables
41+
if to[k] == nil then
42+
to[k] = include_helper({}, v, seen)
43+
end
44+
end
45+
return to
4546
end
4647

4748
-- deeply copies `other' into `class'. keys in `other' that are already
4849
-- defined in `class' are omitted
4950
local function include(class, other)
50-
return include_helper(class, other, {})
51+
return include_helper(class, other, {})
5152
end
5253

5354
-- returns a deep copy of `other'
5455
local function clone(other)
55-
return setmetatable(include({}, other), getmetatable(other))
56+
return setmetatable(include({}, other), getmetatable(other))
5657
end
5758

5859
local function new(class)
59-
-- mixins
60-
class = class or {} -- class can be nil
61-
local inc = class.__includes or {}
62-
if getmetatable(inc) then
63-
inc = { inc }
64-
end
60+
-- mixins
61+
class = class or {} -- class can be nil
62+
local inc = class.__includes or {}
63+
if getmetatable(inc) then
64+
inc = { inc }
65+
end
6566

66-
for _, other in ipairs(inc) do
67-
if type(other) == "string" then
68-
other = _G[other]
69-
end
70-
include(class, other)
71-
end
67+
for _, other in ipairs(inc) do
68+
if type(other) == "string" then
69+
other = _G[other]
70+
end
71+
include(class, other)
72+
end
7273

73-
-- class implementation
74-
class.__index = class
75-
class.init = class.init or class[1] or function() end
76-
class.include = class.include or include
77-
class.clone = class.clone or clone
74+
-- class implementation
75+
class.__index = class
76+
class.init = class.init or class[1] or function() end
77+
class.include = class.include or include
78+
class.clone = class.clone or clone
7879

79-
-- constructor call
80-
return setmetatable(class, {
81-
__call = function(c, ...)
82-
local o = setmetatable({}, c)
83-
o:init(...)
84-
return o
85-
end,
86-
})
80+
-- constructor call
81+
return setmetatable(class, {
82+
__call = function(c, ...)
83+
local o = setmetatable({}, c)
84+
o:init(...)
85+
return o
86+
end,
87+
})
8788
end
8889

8990
-- interface for cross class-system compatibility (see https://github.com/bartbes/Class-Commons).
9091
if class_commons ~= false and not common then
91-
common = {}
92-
function common.class(name, prototype, parent)
93-
return new({ __includes = { prototype, parent } })
94-
end
95-
function common.instance(class, ...)
96-
return class(...)
97-
end
92+
common = {}
93+
function common.class(name, prototype, parent)
94+
return new({ __includes = { prototype, parent } })
95+
end
96+
function common.instance(class, ...)
97+
return class(...)
98+
end
9899
end
99100

100101
-- the module
101102
return setmetatable({ new = new, include = include, clone = clone }, {
102-
__call = function(_, ...)
103-
return new(...)
104-
end,
103+
__call = function(_, ...)
104+
return new(...)
105+
end,
105106
})

0 commit comments

Comments
 (0)