Commit Graph

98 Commits

Author SHA1 Message Date
Dave Halter
e597dcc8fd Remove a Python 2 file 2020-07-02 01:30:34 +02:00
Dave Halter
ac33d5dea3 If branch inference should not trigger for things we don't know, fixes #1530 2020-03-31 22:46:31 +02:00
Dave Halter
ea0972d7ac Make sure to check the module cache before loading a module (again)
This hopefully results in some performance improvements (maybe numpy?).
2020-01-05 18:28:34 +01:00
Dave Halter
92c59180fd Make sure goto definitions works on with, fixes #1280 2019-12-13 16:57:18 +01:00
Dave Halter
24174632d4 Fix some bugs of the last few commits 2018-12-22 22:08:54 +01:00
Dave Halter
1065768c77 Use ContextualizedNode instead of Node in get_calling_nodes
This improves working with these nodes by a lot.
2018-12-22 14:55:37 +01:00
Dave Halter
3ec194093d Fix _sre issues 2018-12-09 12:54:39 +01:00
Dave Halter
021d1bc568 py__iter__ now takes a contextualized_node argument and raises the analysis errors itself 2018-11-23 18:22:38 +01:00
Dave Halter
febe65f737 Disable predefined name analysis (if stmts) for all non-analysis tasks
It's really buggy and caused quite a few issues
2018-01-29 00:56:29 +01:00
Dave Halter
65a6c61dc6 Remove nodes_to_execute in favor of a function in parser_utils. 2017-04-08 12:59:49 +02:00
Dave Halter
24457bfe2e Fix some usage cases of comprehensions. 2017-01-03 02:15:04 +01:00
Dave Halter
03525bbef5 Renamed a static analysis test case to be able to better execute that one explicitly. 2016-12-13 18:13:33 +01:00
Dave Halter
6bad5a924b Making it possible for static analysis tests to be skipped if the python version doesn't match. 2015-12-22 17:37:28 +01:00
Dave Halter
e73b1a683a Tests for python2 print statement. 2015-12-18 17:57:25 +01:00
Dave Halter
c85426ebac More detailed testing for value-error-too-few-values. 2015-12-14 06:54:02 +01:00
Dave Halter
7b8d4e86ac The evaluator recursion limitations are now reset in static analysis for each node, otherwise it's incredibly unprecise. 2015-12-13 17:18:19 +01:00
Dave Halter
106f6f7f5a too many values and too few values errors implemented for list comprehensions tuple unpacking. 2015-12-12 14:09:57 +01:00
Dave Halter
28585dcdba Better testing of classes. 2015-12-12 02:48:37 +01:00
Dave Halter
75ac2b9686 Enable better ways for analysis to analyze loop variables. 2015-12-11 20:25:49 +01:00
Dave Halter
8d3be10270 Fix issues in Python 2.7. 2015-12-10 17:20:21 +01:00
Dave Halter
9bd6e6c340 Fix: iterators are working smoothly now. Finally tests are passing again. 2015-12-10 04:37:23 +01:00
Dave Halter
5f36019752 Added isinstance tests in static analysis. 2015-12-03 16:21:00 +01:00
Dave Halter
8dee92bcc5 Fix: Tuple unpacking to x[0] would raise bugs. 2015-11-24 01:27:23 +01:00
Dave Halter
724f7111a8 Now expr_stmt tuple unpacking automatically works with static analysis. 2015-11-24 01:07:32 +01:00
Dave Halter
8ee42e24a8 Added a test that shouldn't throw an error when using it. However, because we omited statements to use the actual variables the bug is never seen. 2015-11-23 05:48:57 +01:00
Dave Halter
7cc54e08c7 Forgot to include static analysis comprehension tests a while ago. 2015-11-18 18:00:50 +01:00
Dave Halter
e7528198d3 Fix an issue with raise statements in the linter. 2015-09-13 23:45:53 +02:00
Dave Halter
d1218c97bf Tests for finding if branches that are correct. 2015-07-01 14:44:31 +02:00
Dave Halter
e355ab201e Tests and implementation for type on lambda and function objects. 2015-07-01 14:40:57 +02:00
Dave Halter
d694ab83a3 Memoizing statements doesn't work anymore.
Statements now need to be evaluated at least if predefined_names_dict is set.
2015-06-29 13:32:39 +02:00
Dave Halter
5d9fff50af Static analysis tests for type errors with variables. 2015-06-23 18:04:36 +02:00
Dave Halter
6da4f1fffb Static analsyis test for complex flow tests (filtering). 2015-06-22 22:15:02 +02:00
Dave Halter
039579b391 Improved static analysis for imports. 2015-04-23 02:43:49 +02:00
Dave Halter
a998c36fa3 Fix an attribute error in static analysis code. 2015-02-26 14:40:33 +01:00
Dave Halter
f0c6e5709c Some temporary args/kwargs related changes to static analysis. 2014-12-15 14:58:16 +01:00
Dave Halter
7d9f85c762 invalid star star arguments. 2014-12-13 08:34:03 +01:00
Dave Halter
ddd4d675f6 star args improvements 2014-12-13 08:17:38 +01:00
Dave Halter
1b48f6fbce Fix static analysis' argument tests. 2014-12-13 07:33:03 +01:00
Dave Halter
d11ea73ef4 Re-enable AttributeError/NameError detection for more complicated occurances than just statements. 2014-12-11 19:18:00 +01:00
Dave Halter
5e9d9573d5 Don't warn on addition of an int literal plus an unknown int number. 2014-07-22 16:44:10 +02:00
Dave Halter
f7c8c43fbc check not only - but also + for numbers. 2014-07-22 16:18:57 +02:00
Dave Halter
96ca596cc2 fix the operation test where static analysis reports additions of ints with non-ints. 2014-07-22 16:05:46 +02:00
Dave Halter
15f42d93d7 it should be possible to find the origin of an operation, if it's a faulty one (static analysis) 2014-07-22 14:52:58 +02:00
Dave Halter
037d5fa02a static analysis tests for the 1 + '1' test 2014-07-22 01:40:36 +02:00
Dave Halter
0b99473886 ExecutedParams should never be additionally faked, even if they are the first params. They have been legitimately created by a caller. 2014-06-30 15:22:53 +02:00
Dave Halter
0d3ea4dfb4 fix a ModuleWrapper with StarImports. Now all modules are wrapped. 2014-06-29 21:04:52 +02:00
Dave Halter
1c9058ce6b Also issue warnings if setattr is used in a class instead of an error 2014-06-26 13:40:15 +02:00
Dave Halter
4238538df4 Add __getattr__ checks with proper inheritance. 2014-06-26 12:56:01 +02:00
Dave Halter
6e82fa31e1 submodules need relative imports not absolute 2014-06-25 11:08:29 +02:00
Dave Halter
393833059a fixed inheritance for exception checks 2014-06-23 13:01:12 +02:00