Skip to content

Commit

Permalink
fix(python): import for clickhouse rule (#451)
Browse files Browse the repository at this point in the history
  • Loading branch information
elsapet authored Jun 12, 2024
1 parent c99f5b7 commit 20753c7
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions rules/python/third_parties/clickhouse.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,26 @@
imports:
- python_shared_lang_import1
- python_shared_lang_instance
- python_shared_lang_datatype
patterns:
- pattern: |
$<CLIENT>.insert($<...>$<DATA_TYPE>$<...>)
filters:
- variable: CLIENT
detection: python_third_parties_clickhouse_connect_client
scope: result
- variable: DATA_TYPE
detection: python_shared_lang_datatype
scope: result
auxiliary:
- id: python_third_parties_clickhouse_connect_client
patterns:
- pattern: $<CLICKHOUSE_CLIENT>
detection: python_shared_lang_instance
scope: cursor
filters:
- variable: CLICKHOUSE_CLIENT
- variable: CLASS
detection: python_shared_lang_import1
scope: cursor
filters:
- variable: MODULE1
values: [clickhouse_connect]
- variable: NAME
values: [get_client]
- variable: DATA_TYPE
detection: python_shared_lang_datatype
scope: result
languages:
- python
severity: medium
Expand Down

0 comments on commit 20753c7

Please sign in to comment.