Skip to content

Commit

Permalink
fix: parse_args
Browse files Browse the repository at this point in the history
  • Loading branch information
elsapet committed May 10, 2024
1 parent 86f0b4c commit 34f7b5d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion rules/python/shared/lang/dynamic_input.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,19 @@ type: shared
languages:
- python
patterns:
- parser.parse_args()
- sys.argv[$<_>]
- pattern: $<PARSER>.parse_args($<...>)
filters:
- variable: PARSER
detection: python_shared_lang_dynamic_input_parser
scope: result
auxiliary:
- id: python_shared_lang_dynamic_input_parser
patterns:
- pattern: $<ARG_PARSER>
filters:
- variable: ARG_PARSER
regex: \A(argparse\.)ArgumentParser?\z
metadata:
description: "Python dynamic input."
id: python_shared_lang_dynamic_input

0 comments on commit 34f7b5d

Please sign in to comment.