@@ -99,27 +99,21 @@ class GoogleCalendarConfig(SourceConfig):
9999class GoogleDriveConfig (SourceConfig ):
100100 """Google Drive configuration schema."""
101101
102- # exclude_patterns: list[str] = Field(
103- # default=[],
104- # title="Exclude Patterns",
105- # description=(
106- # "List of file/folder paths or patterns to exclude from synchronization. "
107- # "Examples: '*.tmp', 'Private/*', 'Confidential Reports/'. "
108- # "Separate multiple patterns with commas."
109- # ),
110- # )
111-
112- # @validator("exclude_patterns", pre=True)
113- # def parse_exclude_patterns(cls, value):
114- # """Convert string input to list if needed."""
115- # if isinstance(value, str):
116- # if not value.strip():
117- # return []
118- # # Split by commas and strip whitespace
119- # return [pattern.strip() for pattern in value.split(",") if pattern.strip()]
120- # return value
102+ include_patterns : list [str ] = Field (
103+ default = [],
104+ title = "Include Patterns" ,
105+ description = (
106+ "List of file/folder paths to include in synchronization. "
107+ "Examples: 'my_folder/*', 'my_folder/my_file.pdf'. "
108+ "Separate multiple patterns with commas. If empty, all files are included."
109+ ),
110+ )
121111
122- pass
112+ @validator ("include_patterns" , pre = True )
113+ def _parse_include_patterns (cls , value ):
114+ if isinstance (value , str ):
115+ return [p .strip () for p in value .split ("," ) if p .strip ()]
116+ return value
123117
124118
125119class HubspotConfig (SourceConfig ):
0 commit comments