Skip to content

Commit

Permalink
auto: 11-01-25 17:32
Browse files Browse the repository at this point in the history
  • Loading branch information
farfromavocaido committed Jan 11, 2025
1 parent 691403a commit 3088ab2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion summarymaker/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class SummaryConfig:
ignored_file_extensions: List[str] = field(default_factory=lambda: [".pyc", ".exe"])
allowed_file_extensions: List[str] = field(default_factory=lambda: [".env", ".toml", ".json", ".config"])
ignored_files: List[str] = field(default_factory=lambda: [".DS_Store"])
include_file_extensions: List[str] = field(default_factory=list)
only_include: List[str] = field(default_factory=list)

processors: List[object] = field(default_factory=list)
generate_tree: bool = True
Expand Down
4 changes: 2 additions & 2 deletions summarymaker/filtering/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ def collect_included_files(config: SummaryConfig) -> List[FileInfo]:
if file_ext not in config.allowed_file_extensions:
continue

# If include_file_extensions is non-empty, skip anything not in that list
if config.include_file_extensions and file_ext not in config.include_file_extensions:
# If only_include is non-empty, skip anything not in that list
if config.only_include and file_ext not in config.only_include:
continue

# Check if file is likely binary (unless exempt)
Expand Down
4 changes: 2 additions & 2 deletions summarymaker/sample_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def get_dev_config() -> SummaryConfig:
ignored_file_extensions=[],
allowed_file_extensions=[".env", ".toml", ".json", ".config"],
ignored_files=[".DS_Store"],
include_file_extensions=[".py"], # only .py
only_include=[".py"], # only .py
processors=[
RemoveHashCommentsProcessor(),
TruncateProcessor(max_lines=300),
Expand All @@ -42,7 +42,7 @@ def get_blueprint_config() -> SummaryConfig:
ignored_file_extensions=[".pyc"],
allowed_file_extensions=[".env", ".toml", ".json", ".config"],
ignored_files=[".DS_Store"],
include_file_extensions=[], # empty => include everything
only_include=[], # empty => include everything
processors=[], # no special transformations
generate_tree=True,
generate_summarydoc=True,
Expand Down

0 comments on commit 3088ab2

Please sign in to comment.