Skip to content

Commit 586a245

Browse files
committed
PY: fix some ql/non-doc-block warnings
1 parent ef2a164 commit 586a245

File tree

11 files changed

+13
-13
lines changed

11 files changed

+13
-13
lines changed

python/ql/lib/semmle/python/Flow.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ class ControlFlowNode extends @py_flow_node {
299299
exists(BasicBlock b, int i, int j | this = b.getNode(i) and other = b.getNode(j) and i < j)
300300
}
301301

302-
/* Holds if this CFG node is a branch */
302+
/** Holds if this CFG node is a branch */
303303
predicate isBranch() { py_true_successors(this, _) or py_false_successors(this, _) }
304304

305305
ControlFlowNode getAChild() { result = this.getExprChild(this.getBasicBlock()) }

python/ql/lib/semmle/python/dataflow/old/Implementation.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,7 @@ int iterable_unpacking_descent(SequenceNode left_parent, ControlFlowNode left_de
991991
}
992992

993993
module Implementation {
994-
/* A call that returns a copy (or similar) of the argument */
994+
/** Holds if `tonode` is a call that returns a copy (or similar) of the argument `fromnode` */
995995
predicate copyCall(ControlFlowNode fromnode, CallNode tonode) {
996996
tonode.getFunction().(AttrNode).getObject("copy") = fromnode
997997
or

python/ql/lib/semmle/python/dataflow/old/Legacy.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import semmle.python.dataflow.TaintTracking
22
private import semmle.python.objects.ObjectInternal
33
import semmle.python.dataflow.Implementation
44

5-
/* Backwards compatibility with config-less taint-tracking */
5+
/** A configuration that provides backwards compatibility with config-less taint-tracking */
66
private class LegacyConfiguration extends TaintTracking::Configuration {
77
LegacyConfiguration() {
88
/* A name that won't be accidentally chosen by users */

python/ql/lib/semmle/python/dependencies/Dependencies.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,13 @@ private predicate defn_of_instance_attribute(Assign asgn, Class c, string name)
158158
)
159159
}
160160

161-
/* Whether asgn defines an attribute of a class */
161+
/** Holds if asgn defines an attribute of a class */
162162
private predicate defn_of_class_attribute(Assign asgn, Class c, string name) {
163163
asgn.getScope() = c and
164164
asgn.getATarget().(Name).getId() = name
165165
}
166166

167-
/* Holds if `value` is a value assigned to the `name`d attribute of module `m`. */
167+
/** Holds if `value` is a value assigned to the `name`d attribute of module `m`. */
168168
private predicate defn_of_module_attribute(ControlFlowNode value, Module m, string name) {
169169
exists(DefinitionNode def |
170170
def.getScope() = m and

python/ql/lib/semmle/python/objects/ObjectAPI.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ private import semmle.python.types.Builtins
1818

1919
class ObjectSource = Object;
2020

21-
/* Aliases for scopes */
21+
/** An alias for Function used for scopes */
2222
class FunctionScope = Function;
2323

2424
class ClassScope = Class;

python/ql/lib/semmle/python/pointsto/Base.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ int version_tuple_compare(Object t) {
120120
version_tuple_value(t) > major_minor() and result = 1
121121
}
122122

123-
/* Holds if `cls` is a new-style class if it were to have no explicit base classes */
123+
/** Holds if `cls` is a new-style class if it were to have no explicit base classes */
124124
predicate baseless_is_new_style(ClassObject cls) {
125125
cls.isBuiltin()
126126
or

python/ql/lib/semmle/python/pointsto/PointsTo.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2395,7 +2395,7 @@ module Types {
23952395
)
23962396
}
23972397

2398-
/* Holds if type inference failed to compute the full class hierarchy for this class for the reason given. */
2398+
/** Holds if type inference failed to compute the full class hierarchy for this class for the reason given. */
23992399
private predicate failedInference(ClassObjectInternal cls, string reason, int priority) {
24002400
strictcount(cls.(PythonClassObjectInternal).getScope().getADecorator()) > 1 and
24012401
reason = "Multiple decorators" and

python/ql/lib/semmle/python/security/strings/Common.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import python
22

3-
/* A call that returns a copy (or similar) of the argument */
3+
/** A call that returns a copy (or similar) of the argument */
44
deprecated predicate copy_call(ControlFlowNode fromnode, CallNode tonode) {
55
tonode.getFunction().(AttrNode).getObject("copy") = fromnode
66
or

python/ql/lib/semmle/python/types/ClassObject.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ class ClassObject extends Object {
166166
not this.failedInference()
167167
}
168168

169-
/* Whether this class is abstract. */
169+
/** Holds if this class is abstract. */
170170
predicate isAbstract() {
171171
this.getMetaClass() = theAbcMetaClassObject()
172172
or

python/ql/src/Lexical/CommentedOutCode.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,11 @@ private predicate commented_out_code_block(Comment start, Comment end) {
158158
not commented_out_code(non_empty_following(end))
159159
}
160160

161-
/* A single line comment that appears to be commented out code */
161+
/** A single line comment that appears to be commented out code */
162162
class CommentedOutCodeLine extends Comment {
163163
CommentedOutCodeLine() { exists(CommentedOutCodeBlock b | b.contains(this)) }
164164

165-
/* Whether this commented-out code line is likely to be example code embedded in a larger comment. */
165+
/** Holds if this commented-out code line is likely to be example code embedded in a larger comment. */
166166
predicate maybeExampleCode() {
167167
exists(CommentedOutCodeBlock block |
168168
block.contains(this) and

python/ql/src/Resources/FileOpen.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ predicate passes_open_files(Variable v, ControlFlowNode test, boolean sense) {
6666
)
6767
}
6868

69-
/* Helper for `def_is_open` to give better join order */
69+
// Helper for `def_is_open` to give better join order
7070
private predicate passes_open_files(PyEdgeRefinement refinement) {
7171
passes_open_files(refinement.getSourceVariable(), refinement.getPredecessor().getLastNode(),
7272
refinement.getSense())

0 commit comments

Comments
 (0)