Browse Source

Merge "trivial: Remove 'pass_through'"

tags/1.6.0
Jenkins 2 years ago
parent
commit
b398e23e6e
1 changed files with 2 additions and 8 deletions
  1. +2
    -8
      autogenerate_config_docs/autohelp.py

+ 2
- 8
autogenerate_config_docs/autohelp.py View File

@@ -400,18 +400,12 @@ def _use_categories(package_name):
return not os.path.isfile(package_name + '.disable')


def pass_through(line):
"""Whether to ignore the line."""
return (not line.strip() or
line.startswith('#'))


def _get_options_by_cat(package_name):
options_by_cat = {}

with open(package_name + '.flagmappings') as f:
for line in f:
if pass_through(line):
if not line.strip() or line.startswith('#'):
continue
opt, categories = line.split(' ', 1)
for category in categories.split():
@@ -427,7 +421,7 @@ def _get_category_names(package_name):
try:
with open(headers_file) as f:
for line in f:
if pass_through(line):
if not line.strip() or line.startswith('#'):
continue
cat, nice_name = line.split(' ', 1)
category_names[cat] = nice_name.strip()

Loading…
Cancel
Save