mirror of
https://github.com/github/codeql.git
synced 2026-04-29 18:55:14 +02:00
Python: Add test of safe methods for py/modification-of-default-value
This commit is contained in:
@@ -193,3 +193,8 @@ def list_default(x=[1,2,3,4]):
|
||||
|
||||
def tuple_default(x=(1,2)):
|
||||
do_stuff_based_on_type(x)
|
||||
|
||||
# Modification of parameter with default (safe method)
|
||||
|
||||
def safe_method(x=[]):
|
||||
return x.count(42)
|
||||
|
||||
Reference in New Issue
Block a user