cleaning up ba_meta scanner

This commit is contained in:
Eric Froemling 2025-01-16 13:11:34 -08:00
parent b29b130f03
commit e1233454cd
No known key found for this signature in database

View File

@ -327,7 +327,11 @@ class DirectoryScan:
meta_lines = {
lnum: l[1:].split()
for lnum, l in enumerate(flines)
if l.startswith('# ba_meta ')
# Do a simple 'in' check for speed but then make sure its
# also at the beginning of the line. This allows disabling
# meta-lines and avoids false positives from code that
# wrangles them.
if ('# ba_meta' in l and l.strip().startswith('# ba_meta '))
}
is_top_level = len(subpath.parts) <= 1
required_api = self._get_api_requirement(