mirror of
https://github.com/github/codeql.git
synced 2026-04-30 19:26:02 +02:00
Python: Move more tests for argument names into own file
Plus fixup of expected output from unrelated tests
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
edges
|
||||
| functions_test.py:39:9:39:9 | empty mutable value | functions_test.py:40:5:40:5 | empty mutable value |
|
||||
| functions_test.py:133:15:133:15 | empty mutable value | functions_test.py:134:5:134:5 | empty mutable value |
|
||||
| functions_test.py:185:25:185:25 | empty mutable value | functions_test.py:186:5:186:5 | empty mutable value |
|
||||
| functions_test.py:188:21:188:21 | empty mutable value | functions_test.py:189:5:189:5 | empty mutable value |
|
||||
| functions_test.py:191:27:191:27 | empty mutable value | functions_test.py:192:25:192:25 | empty mutable value |
|
||||
| functions_test.py:191:27:191:27 | empty mutable value | functions_test.py:193:21:193:21 | empty mutable value |
|
||||
| functions_test.py:192:25:192:25 | empty mutable value | functions_test.py:185:25:185:25 | empty mutable value |
|
||||
| functions_test.py:193:21:193:21 | empty mutable value | functions_test.py:188:21:188:21 | empty mutable value |
|
||||
| functions_test.py:151:25:151:25 | empty mutable value | functions_test.py:152:5:152:5 | empty mutable value |
|
||||
| functions_test.py:154:21:154:21 | empty mutable value | functions_test.py:155:5:155:5 | empty mutable value |
|
||||
| functions_test.py:157:27:157:27 | empty mutable value | functions_test.py:158:25:158:25 | empty mutable value |
|
||||
| functions_test.py:157:27:157:27 | empty mutable value | functions_test.py:159:21:159:21 | empty mutable value |
|
||||
| functions_test.py:158:25:158:25 | empty mutable value | functions_test.py:151:25:151:25 | empty mutable value |
|
||||
| functions_test.py:159:21:159:21 | empty mutable value | functions_test.py:154:21:154:21 | empty mutable value |
|
||||
#select
|
||||
| functions_test.py:40:5:40:5 | x | functions_test.py:39:9:39:9 | empty mutable value | functions_test.py:40:5:40:5 | empty mutable value | $@ flows to here and is mutated. | functions_test.py:39:9:39:9 | x | Default value |
|
||||
| functions_test.py:134:5:134:5 | x | functions_test.py:133:15:133:15 | empty mutable value | functions_test.py:134:5:134:5 | empty mutable value | $@ flows to here and is mutated. | functions_test.py:133:15:133:15 | x | Default value |
|
||||
| functions_test.py:186:5:186:5 | x | functions_test.py:191:27:191:27 | empty mutable value | functions_test.py:186:5:186:5 | empty mutable value | $@ flows to here and is mutated. | functions_test.py:191:27:191:27 | y | Default value |
|
||||
| functions_test.py:189:5:189:5 | x | functions_test.py:191:27:191:27 | empty mutable value | functions_test.py:189:5:189:5 | empty mutable value | $@ flows to here and is mutated. | functions_test.py:191:27:191:27 | y | Default value |
|
||||
| functions_test.py:152:5:152:5 | x | functions_test.py:157:27:157:27 | empty mutable value | functions_test.py:152:5:152:5 | empty mutable value | $@ flows to here and is mutated. | functions_test.py:157:27:157:27 | y | Default value |
|
||||
| functions_test.py:155:5:155:5 | x | functions_test.py:157:27:157:27 | empty mutable value | functions_test.py:155:5:155:5 | empty mutable value | $@ flows to here and is mutated. | functions_test.py:157:27:157:27 | y | Default value |
|
||||
|
||||
@@ -66,3 +66,39 @@ class NonSelf(object):
|
||||
def s_cmethod2(cls):
|
||||
pass
|
||||
s_cmethod2 = classmethod(s_cmethod2)
|
||||
|
||||
#Possible FPs for non-self. ODASA-2439
|
||||
|
||||
class C(object):
|
||||
def _func(f):
|
||||
return f
|
||||
|
||||
_func(x)
|
||||
|
||||
#or
|
||||
@_func
|
||||
def meth(self):
|
||||
pass
|
||||
|
||||
|
||||
def dont_care(arg):
|
||||
pass
|
||||
|
||||
class C(object):
|
||||
|
||||
meth = dont_care
|
||||
|
||||
class Meta(type):
|
||||
|
||||
#__new__ is an implicit class method, so the first arg is the metaclass
|
||||
def __new__(metacls, name, bases, cls_dict):
|
||||
return super(Meta, metacls).__new__(metacls, name, bases, cls_dict)
|
||||
|
||||
#ODASA-6062
|
||||
import zope.interface
|
||||
class Z(zope.interface.Interface):
|
||||
|
||||
def meth(arg):
|
||||
pass
|
||||
|
||||
Z().meth(0)
|
||||
|
||||
@@ -134,33 +134,6 @@ def augassign(x = []):
|
||||
x += ["x"]
|
||||
|
||||
|
||||
#Possible FPs for non-self. ODASA-2439
|
||||
|
||||
class C(object):
|
||||
def _func(f):
|
||||
return f
|
||||
|
||||
_func(x)
|
||||
|
||||
#or
|
||||
@_func
|
||||
def meth(self):
|
||||
pass
|
||||
|
||||
|
||||
def dont_care(arg):
|
||||
pass
|
||||
|
||||
class C(object):
|
||||
|
||||
meth = dont_care
|
||||
|
||||
class Meta(type):
|
||||
|
||||
#__new__ is an implicit class method, so the first arg is the metaclass
|
||||
def __new__(metacls, name, bases, cls_dict):
|
||||
return super(Meta, metacls).__new__(metacls, name, bases, cls_dict)
|
||||
|
||||
#ODASA 3658
|
||||
from sys import exit
|
||||
#Consistent returns
|
||||
@@ -172,14 +145,7 @@ def ok5():
|
||||
print(e)
|
||||
exit(EXIT_ERROR)
|
||||
|
||||
#ODASA-6062
|
||||
import zope.interface
|
||||
class Z(zope.interface.Interface):
|
||||
|
||||
def meth(arg):
|
||||
pass
|
||||
|
||||
Z().meth(0)
|
||||
|
||||
# indirect modification of parameter with default
|
||||
def aug_assign_argument(x):
|
||||
|
||||
Reference in New Issue
Block a user