Skip to content

Commit 9dcb26d

Browse files
committed
Python: Autoformat
I had not set up the pre-commit hook properly
1 parent e9acea8 commit 9dcb26d

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

python/ql/src/semmle/python/frameworks/Django.qll

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1388,9 +1388,6 @@ private module PrivateDjango {
13881388
// ---------------------------------------------------------------------------
13891389
// Helpers
13901390
// ---------------------------------------------------------------------------
1391-
1392-
1393-
13941391
// ---------------------------------------------------------------------------
13951392
// Form and form field modeling
13961393
// ---------------------------------------------------------------------------
@@ -1458,7 +1455,6 @@ private module PrivateDjango {
14581455
// ---------------------------------------------------------------------------
14591456
// routing modeling
14601457
// ---------------------------------------------------------------------------
1461-
14621458
/**
14631459
* In order to recognize a class as being a django view class, based on the `as_view`
14641460
* call, we need to be able to track such calls on _any_ class. This is provided by

python/ql/src/semmle/python/frameworks/internal/PoorMansFunctionResolution.qll

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,7 @@ private Expr lastDecoratorCall(Function func) {
4444
* print(inst.my_method)
4545
* ```
4646
*/
47-
private DataFlow::LocalSourceNode poorMansFunctionTracker(
48-
DataFlow::TypeTracker t, Function func
49-
) {
47+
private DataFlow::LocalSourceNode poorMansFunctionTracker(DataFlow::TypeTracker t, Function func) {
5048
t.start() and
5149
(
5250
not exists(func.getADecorator()) and
@@ -61,9 +59,7 @@ private DataFlow::LocalSourceNode poorMansFunctionTracker(
6159
result.asExpr() = lastDecoratorCall(func)
6260
)
6361
or
64-
exists(DataFlow::TypeTracker t2 |
65-
result = poorMansFunctionTracker(t2, func).track(t2, t)
66-
)
62+
exists(DataFlow::TypeTracker t2 | result = poorMansFunctionTracker(t2, func).track(t2, t))
6763
}
6864

6965
/**

0 commit comments

Comments
 (0)