Skip to content

Commit 8ea0ee2

Browse files
enable SIM110
1 parent 2fa3f24 commit 8ea0ee2

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

metadata-ingestion/pyproject.toml

-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ extend-ignore = [
4848
"SIM103", # Return the condition directly
4949
"SIM105", # Use `contextlib.suppress(...)` instead of `try`-`except`-`pass`
5050
"SIM108", # Use ternary operator {contents} instead of if-else-block
51-
"SIM110", # Use `return any(re.match(regex_pattern, path, re.IGNORECASE) for path in paths)` instead of `for` loop
5251
"SIM115", # Use a context manager for opening files
5352
"SIM116", # Use a dictionary instead of consecutive `if` statements
5453
"SIM117", # Use a single with statement with multiple contexts instead of nested with statements

metadata-ingestion/src/datahub/ingestion/source/dremio/dremio_api.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -683,11 +683,7 @@ def _check_pattern_match(
683683
# Add end anchor for exact matching
684684
regex_pattern = regex_pattern + "$"
685685

686-
for path in paths:
687-
if re.match(regex_pattern, path, re.IGNORECASE):
688-
return True
689-
690-
return False
686+
return any(re.match(regex_pattern, path, re.IGNORECASE) for path in paths)
691687

692688
def should_include_container(self, path: List[str], name: str) -> bool:
693689
"""

0 commit comments

Comments
 (0)