mirror of
https://github.com/github/codeql.git
synced 2025-12-22 11:46:32 +01:00
Python: Ignore trace.py in ModuleExport.ql test
I guess we could have done this at the very start of introducing this test in this PR, but I think the last commit was mostly inspired from looking at all the things that evidently was re-exported from the trace import, even when I knew they were not available because of the `__all__` definition.
This commit is contained in:
@@ -1,98 +1,51 @@
|
||||
| attr_clash.__init__ | __file__ | attr_clash/__init__.py:2:7:2:14 | ControlFlowNode for __file__ |
|
||||
| attr_clash.__init__ | __file__ | attr_clash/__init__.py:6:6:6:13 | ControlFlowNode for __file__ |
|
||||
| attr_clash.__init__ | check | trace.py:26:1:26:61 | ControlFlowNode for FunctionExpr |
|
||||
| attr_clash.__init__ | clashing_attr | attr_clash/__init__.py:4:17:4:31 | ControlFlowNode for Str |
|
||||
| attr_clash.__init__ | enter | trace.py:11:1:11:21 | ControlFlowNode for FunctionExpr |
|
||||
| attr_clash.__init__ | exit | trace.py:16:1:16:20 | ControlFlowNode for FunctionExpr |
|
||||
| attr_clash.__init__ | status | trace.py:23:1:23:13 | ControlFlowNode for FunctionExpr |
|
||||
| attr_clash.clashing_attr | __file__ | attr_clash/clashing_attr.py:2:7:2:14 | ControlFlowNode for __file__ |
|
||||
| attr_clash.clashing_attr | __file__ | attr_clash/clashing_attr.py:4:6:4:13 | ControlFlowNode for __file__ |
|
||||
| attr_clash.clashing_attr | check | trace.py:26:1:26:61 | ControlFlowNode for FunctionExpr |
|
||||
| attr_clash.clashing_attr | enter | trace.py:11:1:11:21 | ControlFlowNode for FunctionExpr |
|
||||
| attr_clash.clashing_attr | exit | trace.py:16:1:16:20 | ControlFlowNode for FunctionExpr |
|
||||
| attr_clash.clashing_attr | status | trace.py:23:1:23:13 | ControlFlowNode for FunctionExpr |
|
||||
| attr_clash.non_clashing_submodule | __file__ | attr_clash/non_clashing_submodule.py:2:7:2:14 | ControlFlowNode for __file__ |
|
||||
| attr_clash.non_clashing_submodule | __file__ | attr_clash/non_clashing_submodule.py:4:6:4:13 | ControlFlowNode for __file__ |
|
||||
| attr_clash.non_clashing_submodule | check | trace.py:26:1:26:61 | ControlFlowNode for FunctionExpr |
|
||||
| attr_clash.non_clashing_submodule | enter | trace.py:11:1:11:21 | ControlFlowNode for FunctionExpr |
|
||||
| attr_clash.non_clashing_submodule | exit | trace.py:16:1:16:20 | ControlFlowNode for FunctionExpr |
|
||||
| attr_clash.non_clashing_submodule | status | trace.py:23:1:23:13 | ControlFlowNode for FunctionExpr |
|
||||
| bar | __file__ | bar.py:2:7:2:14 | ControlFlowNode for __file__ |
|
||||
| bar | __file__ | bar.py:6:6:6:13 | ControlFlowNode for __file__ |
|
||||
| bar | bar_attr | bar.py:4:12:4:21 | ControlFlowNode for Str |
|
||||
| bar | check | trace.py:26:1:26:61 | ControlFlowNode for FunctionExpr |
|
||||
| bar | enter | trace.py:11:1:11:21 | ControlFlowNode for FunctionExpr |
|
||||
| bar | exit | trace.py:16:1:16:20 | ControlFlowNode for FunctionExpr |
|
||||
| bar | status | trace.py:23:1:23:13 | ControlFlowNode for FunctionExpr |
|
||||
| baz | __file__ | baz.py:2:7:2:14 | ControlFlowNode for __file__ |
|
||||
| baz | __file__ | baz.py:6:6:6:13 | ControlFlowNode for __file__ |
|
||||
| baz | baz_attr | baz.py:4:12:4:21 | ControlFlowNode for Str |
|
||||
| baz | check | trace.py:26:1:26:61 | ControlFlowNode for FunctionExpr |
|
||||
| baz | enter | trace.py:11:1:11:21 | ControlFlowNode for FunctionExpr |
|
||||
| baz | exit | trace.py:16:1:16:20 | ControlFlowNode for FunctionExpr |
|
||||
| baz | status | trace.py:23:1:23:13 | ControlFlowNode for FunctionExpr |
|
||||
| foo | __file__ | foo.py:2:7:2:14 | ControlFlowNode for __file__ |
|
||||
| foo | __file__ | foo.py:14:6:14:13 | ControlFlowNode for __file__ |
|
||||
| foo | __private_foo_attr | foo.py:8:22:8:41 | ControlFlowNode for Str |
|
||||
| foo | bar_reexported | foo.py:11:8:11:10 | ControlFlowNode for ImportExpr |
|
||||
| foo | check | trace.py:26:1:26:61 | ControlFlowNode for FunctionExpr |
|
||||
| foo | enter | trace.py:11:1:11:21 | ControlFlowNode for FunctionExpr |
|
||||
| foo | exit | trace.py:16:1:16:20 | ControlFlowNode for FunctionExpr |
|
||||
| foo | foo_attr | foo.py:5:12:5:21 | ControlFlowNode for Str |
|
||||
| foo | status | trace.py:23:1:23:13 | ControlFlowNode for FunctionExpr |
|
||||
| has_defined_all | __all__ | has_defined_all.py:7:11:7:29 | ControlFlowNode for List |
|
||||
| has_defined_all | __file__ | has_defined_all.py:2:7:2:14 | ControlFlowNode for __file__ |
|
||||
| has_defined_all | __file__ | has_defined_all.py:9:6:9:13 | ControlFlowNode for __file__ |
|
||||
| has_defined_all | all_defined_bar | has_defined_all.py:5:19:5:35 | ControlFlowNode for Str |
|
||||
| has_defined_all | all_defined_foo | has_defined_all.py:4:19:4:35 | ControlFlowNode for Str |
|
||||
| has_defined_all | check | trace.py:26:1:26:61 | ControlFlowNode for FunctionExpr |
|
||||
| has_defined_all | enter | trace.py:11:1:11:21 | ControlFlowNode for FunctionExpr |
|
||||
| has_defined_all | exit | trace.py:16:1:16:20 | ControlFlowNode for FunctionExpr |
|
||||
| has_defined_all | status | trace.py:23:1:23:13 | ControlFlowNode for FunctionExpr |
|
||||
| has_defined_all_copy | __all__ | has_defined_all_copy.py:9:11:9:34 | ControlFlowNode for List |
|
||||
| has_defined_all_copy | __file__ | has_defined_all_copy.py:4:7:4:14 | ControlFlowNode for __file__ |
|
||||
| has_defined_all_copy | __file__ | has_defined_all_copy.py:11:6:11:13 | ControlFlowNode for __file__ |
|
||||
| has_defined_all_copy | all_defined_bar_copy | has_defined_all_copy.py:7:24:7:45 | ControlFlowNode for Str |
|
||||
| has_defined_all_copy | all_defined_foo_copy | has_defined_all_copy.py:6:24:6:45 | ControlFlowNode for Str |
|
||||
| has_defined_all_copy | check | trace.py:26:1:26:61 | ControlFlowNode for FunctionExpr |
|
||||
| has_defined_all_copy | enter | trace.py:11:1:11:21 | ControlFlowNode for FunctionExpr |
|
||||
| has_defined_all_copy | exit | trace.py:16:1:16:20 | ControlFlowNode for FunctionExpr |
|
||||
| has_defined_all_copy | status | trace.py:23:1:23:13 | ControlFlowNode for FunctionExpr |
|
||||
| has_defined_all_indirection | __file__ | has_defined_all_indirection.py:2:7:2:14 | ControlFlowNode for __file__ |
|
||||
| has_defined_all_indirection | __file__ | has_defined_all_indirection.py:6:6:6:13 | ControlFlowNode for __file__ |
|
||||
| has_defined_all_indirection | all_defined_foo_copy | has_defined_all_copy.py:6:24:6:45 | ControlFlowNode for Str |
|
||||
| has_defined_all_indirection | check | trace.py:26:1:26:61 | ControlFlowNode for FunctionExpr |
|
||||
| has_defined_all_indirection | enter | trace.py:11:1:11:21 | ControlFlowNode for FunctionExpr |
|
||||
| has_defined_all_indirection | exit | trace.py:16:1:16:20 | ControlFlowNode for FunctionExpr |
|
||||
| has_defined_all_indirection | status | trace.py:23:1:23:13 | ControlFlowNode for FunctionExpr |
|
||||
| if_then_else | __file__ | if_then_else.py:2:7:2:14 | ControlFlowNode for __file__ |
|
||||
| if_then_else | __file__ | if_then_else.py:16:6:16:13 | ControlFlowNode for __file__ |
|
||||
| if_then_else | check | trace.py:26:1:26:61 | ControlFlowNode for FunctionExpr |
|
||||
| if_then_else | enter | trace.py:11:1:11:21 | ControlFlowNode for FunctionExpr |
|
||||
| if_then_else | exit | trace.py:16:1:16:20 | ControlFlowNode for FunctionExpr |
|
||||
| if_then_else | if_then_else_defined | if_then_else.py:7:28:7:39 | ControlFlowNode for Str |
|
||||
| if_then_else | if_then_else_defined | if_then_else.py:12:32:12:47 | ControlFlowNode for Str |
|
||||
| if_then_else | if_then_else_defined | if_then_else.py:14:32:14:47 | ControlFlowNode for Str |
|
||||
| if_then_else | status | trace.py:23:1:23:13 | ControlFlowNode for FunctionExpr |
|
||||
| if_then_else_refined | SOURCE | if_then_else_refined.py:6:1:6:15 | ControlFlowNode for ClassExpr |
|
||||
| if_then_else_refined | __file__ | if_then_else_refined.py:4:7:4:14 | ControlFlowNode for __file__ |
|
||||
| if_then_else_refined | __file__ | if_then_else_refined.py:19:6:19:13 | ControlFlowNode for __file__ |
|
||||
| if_then_else_refined | check | trace.py:26:1:26:61 | ControlFlowNode for FunctionExpr |
|
||||
| if_then_else_refined | enter | trace.py:11:1:11:21 | ControlFlowNode for FunctionExpr |
|
||||
| if_then_else_refined | exit | trace.py:16:1:16:20 | ControlFlowNode for FunctionExpr |
|
||||
| if_then_else_refined | src | if_then_else_refined.py:11:11:11:16 | ControlFlowNode for SOURCE |
|
||||
| if_then_else_refined | src | if_then_else_refined.py:13:11:13:16 | ControlFlowNode for SOURCE |
|
||||
| if_then_else_refined | status | trace.py:23:1:23:13 | ControlFlowNode for FunctionExpr |
|
||||
| main | __file__ | main.py:24:7:24:14 | ControlFlowNode for __file__ |
|
||||
| main | __file__ | main.py:149:6:149:13 | ControlFlowNode for __file__ |
|
||||
| main | aliased_subpackage | main.py:54:21:54:52 | ControlFlowNode for ImportMember |
|
||||
| main | aliased_subpackage | main.py:65:8:65:25 | ControlFlowNode for ImportExpr |
|
||||
| main | all_defined_foo | has_defined_all.py:4:19:4:35 | ControlFlowNode for Str |
|
||||
| main | bar_attr | main.py:42:17:42:24 | ControlFlowNode for ImportMember |
|
||||
| main | check | trace.py:26:1:26:61 | ControlFlowNode for FunctionExpr |
|
||||
| main | clashing_attr | main.py:83:24:83:36 | ControlFlowNode for ImportMember |
|
||||
| main | enter | trace.py:11:1:11:21 | ControlFlowNode for FunctionExpr |
|
||||
| main | exit | trace.py:16:1:16:20 | ControlFlowNode for FunctionExpr |
|
||||
| main | foo | main.py:27:8:27:10 | ControlFlowNode for ImportExpr |
|
||||
| main | foo_alias | main.py:34:8:34:10 | ControlFlowNode for ImportExpr |
|
||||
| main | has_defined_all | main.py:100:8:100:22 | ControlFlowNode for ImportExpr |
|
||||
@@ -108,73 +61,34 @@
|
||||
| main | print_function | main.py:21:24:21:37 | ControlFlowNode for ImportMember |
|
||||
| main | refined | main.py:139:8:139:14 | ControlFlowNode for ImportExpr |
|
||||
| main | simplistic_reexport | main.py:145:8:145:26 | ControlFlowNode for ImportExpr |
|
||||
| main | status | trace.py:23:1:23:13 | ControlFlowNode for FunctionExpr |
|
||||
| main | subpackage2_attr | package/subpackage2/__init__.py:4:20:4:37 | ControlFlowNode for Str |
|
||||
| main | subpackage_attr | main.py:46:32:46:46 | ControlFlowNode for ImportMember |
|
||||
| main | sys | main.py:22:8:22:10 | ControlFlowNode for ImportExpr |
|
||||
| namespace_package.namespace_module | __file__ | namespace_package/namespace_module.py:2:7:2:14 | ControlFlowNode for __file__ |
|
||||
| namespace_package.namespace_module | __file__ | namespace_package/namespace_module.py:6:6:6:13 | ControlFlowNode for __file__ |
|
||||
| namespace_package.namespace_module | check | trace.py:26:1:26:61 | ControlFlowNode for FunctionExpr |
|
||||
| namespace_package.namespace_module | enter | trace.py:11:1:11:21 | ControlFlowNode for FunctionExpr |
|
||||
| namespace_package.namespace_module | exit | trace.py:16:1:16:20 | ControlFlowNode for FunctionExpr |
|
||||
| namespace_package.namespace_module | namespace_module_attr | namespace_package/namespace_module.py:4:25:4:47 | ControlFlowNode for Str |
|
||||
| namespace_package.namespace_module | status | trace.py:23:1:23:13 | ControlFlowNode for FunctionExpr |
|
||||
| package.__init__ | __file__ | package/__init__.py:2:7:2:14 | ControlFlowNode for __file__ |
|
||||
| package.__init__ | __file__ | package/__init__.py:7:6:7:13 | ControlFlowNode for __file__ |
|
||||
| package.__init__ | attr_used_in_subpackage | package/__init__.py:4:27:4:51 | ControlFlowNode for Str |
|
||||
| package.__init__ | check | trace.py:26:1:26:61 | ControlFlowNode for FunctionExpr |
|
||||
| package.__init__ | enter | trace.py:11:1:11:21 | ControlFlowNode for FunctionExpr |
|
||||
| package.__init__ | exit | trace.py:16:1:16:20 | ControlFlowNode for FunctionExpr |
|
||||
| package.__init__ | package_attr | package/__init__.py:5:16:5:29 | ControlFlowNode for Str |
|
||||
| package.__init__ | status | trace.py:23:1:23:13 | ControlFlowNode for FunctionExpr |
|
||||
| package.subpackage2.__init__ | __file__ | package/subpackage2/__init__.py:2:7:2:14 | ControlFlowNode for __file__ |
|
||||
| package.subpackage2.__init__ | __file__ | package/subpackage2/__init__.py:6:6:6:13 | ControlFlowNode for __file__ |
|
||||
| package.subpackage2.__init__ | check | trace.py:26:1:26:61 | ControlFlowNode for FunctionExpr |
|
||||
| package.subpackage2.__init__ | enter | trace.py:11:1:11:21 | ControlFlowNode for FunctionExpr |
|
||||
| package.subpackage2.__init__ | exit | trace.py:16:1:16:20 | ControlFlowNode for FunctionExpr |
|
||||
| package.subpackage2.__init__ | status | trace.py:23:1:23:13 | ControlFlowNode for FunctionExpr |
|
||||
| package.subpackage2.__init__ | subpackage2_attr | package/subpackage2/__init__.py:4:20:4:37 | ControlFlowNode for Str |
|
||||
| package.subpackage.__init__ | __file__ | package/subpackage/__init__.py:2:7:2:14 | ControlFlowNode for __file__ |
|
||||
| package.subpackage.__init__ | __file__ | package/subpackage/__init__.py:14:6:14:13 | ControlFlowNode for __file__ |
|
||||
| package.subpackage.__init__ | check | trace.py:26:1:26:61 | ControlFlowNode for FunctionExpr |
|
||||
| package.subpackage.__init__ | enter | trace.py:11:1:11:21 | ControlFlowNode for FunctionExpr |
|
||||
| package.subpackage.__init__ | exit | trace.py:16:1:16:20 | ControlFlowNode for FunctionExpr |
|
||||
| package.subpackage.__init__ | imported_attr | package/subpackage/__init__.py:7:16:7:55 | ControlFlowNode for ImportMember |
|
||||
| package.subpackage.__init__ | irrelevant_attr | package/subpackage/__init__.py:11:24:11:38 | ControlFlowNode for ImportMember |
|
||||
| package.subpackage.__init__ | status | trace.py:23:1:23:13 | ControlFlowNode for FunctionExpr |
|
||||
| package.subpackage.__init__ | subpackage_attr | package/subpackage/__init__.py:4:19:4:35 | ControlFlowNode for Str |
|
||||
| package.subpackage.submodule | __file__ | package/subpackage/submodule.py:2:7:2:14 | ControlFlowNode for __file__ |
|
||||
| package.subpackage.submodule | __file__ | package/subpackage/submodule.py:7:6:7:13 | ControlFlowNode for __file__ |
|
||||
| package.subpackage.submodule | check | trace.py:26:1:26:61 | ControlFlowNode for FunctionExpr |
|
||||
| package.subpackage.submodule | enter | trace.py:11:1:11:21 | ControlFlowNode for FunctionExpr |
|
||||
| package.subpackage.submodule | exit | trace.py:16:1:16:20 | ControlFlowNode for FunctionExpr |
|
||||
| package.subpackage.submodule | irrelevant_attr | package/subpackage/submodule.py:5:19:5:35 | ControlFlowNode for Str |
|
||||
| package.subpackage.submodule | status | trace.py:23:1:23:13 | ControlFlowNode for FunctionExpr |
|
||||
| package.subpackage.submodule | submodule_attr | package/subpackage/submodule.py:4:18:4:33 | ControlFlowNode for Str |
|
||||
| refined | SOURCE | refined.py:4:1:4:21 | ControlFlowNode for ClassExpr |
|
||||
| refined | __file__ | refined.py:2:7:2:14 | ControlFlowNode for __file__ |
|
||||
| refined | __file__ | refined.py:14:6:14:13 | ControlFlowNode for __file__ |
|
||||
| refined | check | trace.py:26:1:26:61 | ControlFlowNode for FunctionExpr |
|
||||
| refined | enter | trace.py:11:1:11:21 | ControlFlowNode for FunctionExpr |
|
||||
| refined | exit | trace.py:16:1:16:20 | ControlFlowNode for FunctionExpr |
|
||||
| refined | status | trace.py:23:1:23:13 | ControlFlowNode for FunctionExpr |
|
||||
| simplistic_reexport | __file__ | simplistic_reexport.py:4:7:4:14 | ControlFlowNode for __file__ |
|
||||
| simplistic_reexport | __file__ | simplistic_reexport.py:19:6:19:13 | ControlFlowNode for __file__ |
|
||||
| simplistic_reexport | bar_attr | simplistic_reexport.py:6:17:6:24 | ControlFlowNode for ImportMember |
|
||||
| simplistic_reexport | bar_attr | simplistic_reexport.py:9:12:9:24 | ControlFlowNode for Str |
|
||||
| simplistic_reexport | baz_attr | baz.py:4:12:4:21 | ControlFlowNode for Str |
|
||||
| simplistic_reexport | baz_attr | simplistic_reexport.py:16:12:16:24 | ControlFlowNode for Str |
|
||||
| simplistic_reexport | check | trace.py:26:1:26:61 | ControlFlowNode for FunctionExpr |
|
||||
| simplistic_reexport | enter | trace.py:11:1:11:21 | ControlFlowNode for FunctionExpr |
|
||||
| simplistic_reexport | exit | trace.py:16:1:16:20 | ControlFlowNode for FunctionExpr |
|
||||
| simplistic_reexport | status | trace.py:23:1:23:13 | ControlFlowNode for FunctionExpr |
|
||||
| trace | __all__ | trace.py:52:11:52:46 | ControlFlowNode for List |
|
||||
| trace | _indent_level | trace.py:3:17:3:17 | ControlFlowNode for IntegerLiteral |
|
||||
| trace | _print | trace.py:5:10:5:14 | ControlFlowNode for print |
|
||||
| trace | _status | trace.py:21:11:21:11 | ControlFlowNode for IntegerLiteral |
|
||||
| trace | check | trace.py:26:1:26:61 | ControlFlowNode for FunctionExpr |
|
||||
| trace | enter | trace.py:11:1:11:21 | ControlFlowNode for FunctionExpr |
|
||||
| trace | exit | trace.py:16:1:16:20 | ControlFlowNode for FunctionExpr |
|
||||
| trace | print | trace.py:7:1:7:27 | ControlFlowNode for FunctionExpr |
|
||||
| trace | print_function | trace.py:1:24:1:37 | ControlFlowNode for ImportMember |
|
||||
| trace | status | trace.py:23:1:23:13 | ControlFlowNode for FunctionExpr |
|
||||
|
||||
@@ -5,5 +5,6 @@ import semmle.python.dataflow.new.internal.ImportResolution
|
||||
from Module m, string name, DataFlow::Node defn
|
||||
where
|
||||
ImportResolution::module_export(m, name, defn) and
|
||||
exists(m.getLocation().getFile().getRelativePath())
|
||||
exists(m.getLocation().getFile().getRelativePath()) and
|
||||
not defn.getScope() = any(Module trace | trace.getName() = "trace")
|
||||
select m.getName(), name, defn
|
||||
|
||||
Reference in New Issue
Block a user