File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
test/2/query-tests/Classes/new-style Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 1212 */
1313
1414import python
15- private import LegacyPointsTo
15+ private import semmle.python.dataflow.new.internal.DataFlowDispatch
1616
17- from ClassObject c
18- where not c .isNewStyle ( ) and c .declaresAttribute ( "__slots__" ) and not c .failedInference ( )
17+ from Class c
18+ where
19+ not DuckTyping:: isNewStyle ( c ) and
20+ DuckTyping:: declaresAttribute ( c , "__slots__" )
1921select c ,
2022 "Using '__slots__' in an old style class just creates a class attribute called '__slots__'."
Original file line number Diff line number Diff line change 1- | newstyle_test.py:4:1:4:16 | class OldStyle1 | Using '__slots__' in an old style class just creates a class attribute called '__slots__'. |
1+ | newstyle_test.py:4:1:4:16 | Class OldStyle1 | Using '__slots__' in an old style class just creates a class attribute called '__slots__'. |
You can’t perform that action at this time.
0 commit comments