From 3bda88ff64c2368f402c62ddec2ea281afcbff5a Mon Sep 17 00:00:00 2001 From: Uli Schlachter Date: Sun, 26 Mar 2017 21:20:18 +0200 Subject: [PATCH] Remove obsolete entries from check_for_invalid_requires.lua (#1673) Most of the entries that are marked as "TODO: Get rid of these" were handled. wibox.layout.align:get_children() never worked (it always called a non-existent function), so we can easily fix this entry without introducing a regression. I opened https://github.com/awesomeWM/awesome/issues/1672 to track the underlying problem behind the broken :get_children() function (which is missing test coverage). Signed-off-by: Uli Schlachter --- build-utils/check_for_invalid_requires.lua | 5 ----- lib/wibox/layout/align.lua | 4 ++-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/build-utils/check_for_invalid_requires.lua b/build-utils/check_for_invalid_requires.lua index a5ec5b19b..924c902eb 100755 --- a/build-utils/check_for_invalid_requires.lua +++ b/build-utils/check_for_invalid_requires.lua @@ -48,11 +48,6 @@ local allowed_deps = { wibox = true, }, -- TODO: Get rid of these - ["beautiful.xresources"] = { ["awful.util"] = true }, - ["gears.object"] = { ["awful.util"] = true }, - ["wibox.container"] = { ["awful.util"] = true }, - ["wibox.layout"] = { ["awful.util"] = true }, - ["wibox.widget"] = { ["awful.util"] = true }, ["gears.surface"] = { ["wibox.hierarchy"] = true }, } diff --git a/lib/wibox/layout/align.lua b/lib/wibox/layout/align.lua index fc0d84abf..000420633 100644 --- a/lib/wibox/layout/align.lua +++ b/lib/wibox/layout/align.lua @@ -10,7 +10,7 @@ local table = table local pairs = pairs local type = type local floor = math.floor -local util = require("awful.util") +local gtable = require("gears.table") local base = require("wibox.widget.base") local align = {} @@ -186,7 +186,7 @@ end -- @property children function align:get_children() - return util.from_sparse {self._private.first, self._private.second, self._private.third} + return gtable.from_sparse {self._private.first, self._private.second, self._private.third} end function align:set_children(children)