Taus
cd1619b43e
Python: Fix queries and tests
2025-11-26 17:06:55 +00:00
Taus
5b63b4957c
Python: Fix query tests
...
Mostly just adding `private import LegacyPointsTo`. Sometimes getting
rid of other imports that are superceded by that module.
2025-11-26 12:30:30 +00:00
Taus
78c33ab55a
Python: Remove points-to references from python.qll
...
For now, these have just been made into `private` imports. After doing
this, I went through all of the (now not compiling) files and added in
private imports to the modules that they actually depended on.
I also added an explicit import of `LegacyPointsTo` (even though it may
be unnecessary) in cases where the points-to dependency was somewhat
surprising (and one we want to get rid of). This was primarily inside
the various SSA layers.
For modules inside `semmle.python.{types, objects, pointsto}` I did not
bother, as these are fairly clearly related to points-to.
2025-11-26 12:30:30 +00:00
Taus
b93ce98612
Python: Remove points-to from Expr
2025-10-30 13:58:59 +00:00
Joe Farebrother
f457453647
Update redundant assignment to be a correctness issue for cross language consistency
2025-06-19 14:22:12 +01:00
Joe Farebrother
4b1d31c976
Tag 'linter-like' quality queries that don't use pointsto
2025-06-19 14:07:42 +01:00
Taus
24000a50e6
Python: Fix bad join in py/redundant-assignment
...
A minor thing, but still best avoided:
```
Tuple counts for RedundantAssignment::pyflakes_commented_line#bb/2@0477c7 after 14.2s:
160826 ~0% {2} r1 = SCAN py_comments OUTPUT In.2, In.1
160826 ~0% {3} r2 = JOIN r1 WITH project#Files::Location::hasLocationInfo_dispred#bfffff ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Rhs.2 'result'
160826 ~3% {3} r3 = JOIN r2 WITH files_10#join_rhs ON FIRST 1 OUTPUT Lhs.2 'result', Lhs.1, Rhs.1 'file'
46672419 ~4% {4} r4 = JOIN r3 WITH Files::Location::getStartLine_dispred#bf_10#join_rhs ON FIRST 1 OUTPUT Rhs.1, Lhs.2 'file', Lhs.1, Lhs.0 'result'
3951 ~0% {4} r5 = JOIN r4 WITH Files::Location::getFile_dispred#bf ON FIRST 2 OUTPUT Lhs.2, Lhs.3 'result', Lhs.1 'file', toLower(Lhs.2)
0 ~0% {4} r6 = SELECT r5 ON In.3 contains "pyflakes"
0 ~0% {2} r7 = SCAN r6 OUTPUT In.2 'file', In.1 'result'
return r7
```
2021-11-09 20:31:44 +00:00
Taus Brock-Nannestad
f07a7bf8cf
Python: Autoformat everything using qlformat.
...
Will need subsequent PRs fixing up test failures (due to deprecated
methods moving around), but other than that everything should be
straight-forward.
2020-07-07 15:43:52 +02:00
Taus Brock-Nannestad
87a9f51c78
Python: Autoformat all .ql files.
2020-03-30 11:59:10 +02:00
Rasmus Wriedt Larsen
b4ab0b55be
Python: Modernise Statements/RedundantAssignment
2020-02-19 14:12:22 +01:00
Rasmus Wriedt Larsen
13568b7b9f
Python: Modernise Statements/ queries
...
Almost. Left out a few things marked with TODO
2020-02-19 14:10:29 +01:00
Rasmus Wriedt Larsen
381668871d
Python: Autoformat statements
2020-02-19 14:05:55 +01:00
Rasmus Wriedt Larsen
96d5703f2c
Python: Remove use of deprecated methods
2020-01-22 13:45:14 +01:00
Mark Shannon
35fa5d8f60
Python move various theXXX() predicates into the appropriate module.
2019-02-20 10:34:08 +00:00
Mark Shannon
5f58824d1b
Initial commit of Python queries and QL libraries.
2018-11-19 15:10:42 +00:00