Commit 6c40db7
Remove leading underscore in __test_sink, __test_source, etc.
Summary:
The naming convention for these test functions will break if we start handling private names correctly in classes, see docs on private name mangling: https://docs.python.org/3/reference/expressions.html?highlight=mangling
At runtime, it's impossible to access a function named with a leading double underscore from inside a class:
```
>>> def __toplevel(x: int) -> int:
... return x
...
>>> class Foo:
... def test(self):
... print(__toplevel(1))
...
>>> Foo().test()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 3, in test
NameError: name '_Foo__toplevel' is not defined
```
This diff is a no-op except adjusting the naming of these test helpers to lead with a single underscore instead.
Includes: `__test_sink`, `__test_source`
still need to do: `__global_sink`, `__user_controlled`, `__tito`
Reviewed By: gbleaney
Differential Revision: D30150334
fbshipit-source-id: 271814d20ef9df6984531bffe8158151cfd915741 parent 0852005 commit 6c40db7
File tree
196 files changed
+3290
-3290
lines changed- source
- analysis/test
- interprocedural_analyses/taint/test
- integration
- interprocedural/test
- test
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
196 files changed
+3290
-3290
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2502 | 2502 | | |
2503 | 2503 | | |
2504 | 2504 | | |
2505 | | - | |
| 2505 | + | |
2506 | 2506 | | |
2507 | 2507 | | |
2508 | 2508 | | |
| |||
2512 | 2512 | | |
2513 | 2513 | | |
2514 | 2514 | | |
2515 | | - | |
| 2515 | + | |
2516 | 2516 | | |
2517 | 2517 | | |
2518 | 2518 | | |
2519 | 2519 | | |
2520 | 2520 | | |
2521 | 2521 | | |
2522 | | - | |
| 2522 | + | |
2523 | 2523 | | |
2524 | 2524 | | |
2525 | 2525 | | |
| |||
2530 | 2530 | | |
2531 | 2531 | | |
2532 | 2532 | | |
2533 | | - | |
| 2533 | + | |
2534 | 2534 | | |
2535 | 2535 | | |
2536 | 2536 | | |
| |||
2554 | 2554 | | |
2555 | 2555 | | |
2556 | 2556 | | |
2557 | | - | |
| 2557 | + | |
2558 | 2558 | | |
2559 | 2559 | | |
2560 | 2560 | | |
2561 | 2561 | | |
2562 | | - | |
| 2562 | + | |
2563 | 2563 | | |
2564 | 2564 | | |
2565 | 2565 | | |
| |||
2569 | 2569 | | |
2570 | 2570 | | |
2571 | 2571 | | |
2572 | | - | |
| 2572 | + | |
2573 | 2573 | | |
2574 | 2574 | | |
2575 | 2575 | | |
2576 | 2576 | | |
2577 | | - | |
| 2577 | + | |
2578 | 2578 | | |
2579 | 2579 | | |
2580 | 2580 | | |
| |||
2587 | 2587 | | |
2588 | 2588 | | |
2589 | 2589 | | |
2590 | | - | |
| 2590 | + | |
2591 | 2591 | | |
2592 | 2592 | | |
2593 | 2593 | | |
2594 | 2594 | | |
2595 | 2595 | | |
2596 | | - | |
| 2596 | + | |
2597 | 2597 | | |
2598 | 2598 | | |
2599 | 2599 | | |
| |||
0 commit comments