File: __init__.py

package info (click to toggle)
python-ntc-templates 3.5.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 17,104 kB
  • sloc: python: 735; makefile: 14; sh: 2
file content (13 lines) | stat: -rw-r--r-- 344 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
"""tests."""

import os
import csv

from ntc_templates.parse import _get_template_dir


def load_index_data():
    """Load data from index file."""
    with open(f"{_get_template_dir()}{os.sep}index", encoding="utf-8") as indexfs:
        data = csv.reader(indexfs)
        return [row for row in data if len(row) > 2 and row[0] != "Template"]