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:
@@ -1,7 +1,8 @@
|
|||||||
import os
|
import os
|
||||||
import argparse
|
import argparse
|
||||||
from pathspec import PathSpec
|
from pathspec import PathSpec
|
||||||
import yaml
|
import yaml # type: ignore
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
'''
|
'''
|
||||||
Usage:
|
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."""
|
"""Encode the file tree into a single YAML file."""
|
||||||
ignore_patterns = load_ignore_patterns(
|
ignore_patterns = load_ignore_patterns(
|
||||||
ignore_file, include_library) if ignore_file else None
|
ignore_file, include_library) if ignore_file else None
|
||||||
file_tree = {}
|
file_tree: dict[str, Any] = {}
|
||||||
|
|
||||||
for root, dirs, files in os.walk(directory):
|
for root, dirs, files in os.walk(directory):
|
||||||
# Skip ignored directories
|
# Skip ignored directories
|
||||||
|
|||||||
Reference in New Issue
Block a user