jw.pkg.App.get_modules_from_project_txt(): Add Scope
Add the Enum "Scope" to denote the scope argument of jw.pkg.App.get_modules_from_project_txt(), because it explains itself better than an integer.
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
bf4834085e
commit
f6ed191d73
11 changed files with 36 additions and 24 deletions
|
|
@ -6,6 +6,7 @@ from functools import lru_cache
|
|||
|
||||
from ...lib.log import *
|
||||
from ..Cmd import Cmd
|
||||
from ...App import Scope
|
||||
|
||||
class CmdBuild(Cmd): # export
|
||||
|
||||
|
|
@ -36,7 +37,7 @@ class CmdBuild(Cmd): # export
|
|||
dep_cache[prereq_type]: dict[str, str] = {}
|
||||
|
||||
ret = self.app.get_modules_from_project_txt([ cur ], ['pkg.requires.jw'],
|
||||
prereq_type, scope = 2, add_self=False, names_only=True)
|
||||
prereq_type, scope = Scope.Subtree, add_self=False, names_only=True)
|
||||
log(DEBUG, 'prerequisites = ' + ' '.join(ret))
|
||||
if cur in ret:
|
||||
ret.remove(cur)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue