SIENTIAPDE-1314
Enhance type hinting in encrypt.py for better code clarity - Added type hint for the `file_tree` variable as a dictionary with string keys and Any values. - Included a type ignore comment for the yaml import to address type checking issues.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user