From 67ef1d201644664afdfa2373e72495280a0c3fa0 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Tue, 16 Jan 2018 23:42:02 +0100 Subject: Move _rec_invalidate_if_has_prompt() to after _rec_invalidate() --- kconfiglib.py | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'kconfiglib.py') diff --git a/kconfiglib.py b/kconfiglib.py index b65fe00..f111fe5 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -2875,25 +2875,6 @@ class Symbol(object): return (1,) - def _rec_invalidate_if_has_prompt(self): - """ - Invalidates the symbol and its dependent symbols, but only if the - symbol has a prompt. User values never have an effect on promptless - symbols, so we skip invalidation for them as an optimization. - - Prints a warning if the symbol has no prompt. In some contexts (e.g. - when loading a .config files) assignments to promptless symbols are - normal and expected, so the warning can be disabled. - """ - for node in self.nodes: - if node.prompt: - self._rec_invalidate() - return - - if self.kconfig._warn_no_prompt: - self.kconfig._warn(self.name + " has no prompt, meaning user " - "values have no effect on it") - def _invalidate(self): """ Marks the symbol as needing to be recalculated. @@ -2933,6 +2914,25 @@ class Symbol(object): if item._cached_vis is not None: item._rec_invalidate() + def _rec_invalidate_if_has_prompt(self): + """ + Invalidates the symbol and its dependent symbols, but only if the + symbol has a prompt. User values never have an effect on promptless + symbols, so we skip invalidation for them as an optimization. + + Prints a warning if the symbol has no prompt. In some contexts (e.g. + when loading a .config files) assignments to promptless symbols are + normal and expected, so the warning can be disabled. + """ + for node in self.nodes: + if node.prompt: + self._rec_invalidate() + return + + if self.kconfig._warn_no_prompt: + self.kconfig._warn(self.name + " has no prompt, meaning user " + "values have no effect on it") + class Choice(object): """ Represents a choice statement: -- cgit v1.2.3