SIENTIAPDE-1314

SIENTIAPDE-1314: Update type annotations in encrypt.py for improved clarity and type safety. Added type hint for file_tree variable and included type ignore for yaml import.
This commit is contained in:
vitor-aignosi
2025-10-23 16:15:29 -03:00
parent 05fa808bfd
commit d1521838c5

View File

@@ -1,7 +1,8 @@
import os
import argparse
from pathspec import PathSpec
import yaml
import yaml # type: ignore
from typing import Any
'''
Usage:
@@ -33,7 +34,7 @@ def encode_file_tree_to_yaml(directory, ignore_file, include_library):
"""Encode the file tree into a single YAML file."""
ignore_patterns = load_ignore_patterns(
ignore_file, include_library) if ignore_file else None
file_tree = {}
file_tree: dict[str, Any] = {}
for root, dirs, files in os.walk(directory):
# Skip ignored directories