Skip to content

Commit d260388

Browse files
authored
Python: Fix a bunch of class QLDoc
1 parent af7f532 commit d260388

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+136
-121
lines changed

python/ql/lib/semmle/python/AstExtended.qll

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

3-
/** Syntactic node (Class, Function, Module, Expr, Stmt or Comprehension) corresponding to a flow node */
3+
/** A syntactic node (Class, Function, Module, Expr, Stmt or Comprehension) corresponding to a flow node */
44
abstract class AstNode extends AstNode_ {
55
/*
66
* Special comment for documentation generation.
@@ -61,31 +61,31 @@ abstract class AstNode extends AstNode_ {
6161
}
6262

6363
/* Parents */
64-
/** Internal implementation class */
64+
/** The parent of a `Function`. Internal implementation class */
6565
class FunctionParent extends FunctionParent_ { }
6666

67-
/** Internal implementation class */
67+
/** The parent of an `Arguments` node. Internal implementation class */
6868
class ArgumentsParent extends ArgumentsParent_ { }
6969

70-
/** Internal implementation class */
70+
/** The parent of an `ExprList`. Internal implementation class */
7171
class ExprListParent extends ExprListParent_ { }
7272

73-
/** Internal implementation class */
73+
/** The parent of an `ExprContext`. Internal implementation class */
7474
class ExprContextParent extends ExprContextParent_ { }
7575

76-
/** Internal implementation class */
76+
/** The parent of a `StmtList`. Internal implementation class */
7777
class StmtListParent extends StmtListParent_ { }
7878

79-
/** Internal implementation class */
79+
/** The parent of a `StrList`. Internal implementation class */
8080
class StrListParent extends StrListParent_ { }
8181

82-
/** Internal implementation class */
82+
/** The parent of an `Expr`. Internal implementation class */
8383
class ExprParent extends ExprParent_ { }
8484

85-
/** Internal implementation class */
85+
/** The parent of a `PatternList`. Internal implementation class */
8686
class PatternListParent extends PatternListParent_ { }
8787

88-
/** Internal implementation class */
88+
/** The parent of a `Pattern`. Internal implementation class */
8989
class PatternParent extends PatternParent_ { }
9090

9191
class DictItem extends DictItem_, AstNode {
@@ -120,7 +120,7 @@ class Comprehension extends Comprehension_, AstNode {
120120
class BytesOrStr extends BytesOrStr_ { }
121121

122122
/**
123-
* Part of a string literal formed by implicit concatenation.
123+
* A part of a string literal formed by implicit concatenation.
124124
* For example the string literal "abc" expressed in the source as `"a" "b" "c"`
125125
* would be composed of three `StringPart`s.
126126
*/

python/ql/lib/semmle/python/Comprehensions.qll

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

3-
/** Base class for list, set and dictionary comprehensions, and generator expressions. */
3+
/** The base class for list, set and dictionary comprehensions, and generator expressions. */
44
abstract class Comp extends Expr {
55
abstract Function getFunction();
66

python/ql/lib/semmle/python/Exprs.qll

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ class Ellipsis extends Ellipsis_ {
315315
}
316316

317317
/**
318-
* Immutable literal expressions (except tuples).
318+
* An immutable literal expression (except tuples).
319319
* Consists of string (both unicode and byte) literals and numeric literals.
320320
*/
321321
abstract class ImmutableLiteral extends Expr {
@@ -687,7 +687,7 @@ class False extends BooleanLiteral {
687687
override boolean booleanValue() { result = false }
688688
}
689689

690-
/** `None` */
690+
/** The `None` constant. */
691691
class None extends NameConstant {
692692
/* syntax: None */
693693
None() { name_consts(this, "None") }
@@ -730,20 +730,20 @@ class Guard extends Guard_ {
730730
/** A context in which an expression used */
731731
class ExprContext extends ExprContext_ { }
732732

733-
/** Load context, the context of var in len(var) */
733+
/** The load context, the context of var in len(var) */
734734
class Load extends Load_ { }
735735

736-
/** Store context, the context of var in var = 0 */
736+
/** The store context, the context of var in var = 0 */
737737
class Store extends Store_ { }
738738

739-
/** Delete context, the context of var in del var */
739+
/** The delete context, the context of var in del var */
740740
class Del extends Del_ { }
741741

742-
/** This is an artifact of the Python grammar which includes an AugLoad context, even though it is never used. */
742+
/** The context of an augmented load. This is an artifact of the Python grammar which includes an AugLoad context, even though it is never used. */
743743
class AugLoad extends AugLoad_ { }
744744

745-
/** Augmented store context, the context of var in var += 1 */
745+
/** The augmented store context, the context of var in var += 1 */
746746
class AugStore extends AugStore_ { }
747747

748-
/** Parameter context, the context of var in def f(var): pass */
748+
/** The parameter context, the context of var in def f(var): pass */
749749
class Param extends Param_ { }

python/ql/lib/semmle/python/Operations.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import python
22

3-
/** Base class for operators */
3+
/** The base class for operators */
44
class Operator extends Operator_ {
55
/** Gets the name of the special method used to implement this operator */
66
string getSpecialMethodName() { none() }
@@ -131,7 +131,7 @@ class Compare extends Compare_ {
131131
}
132132
}
133133

134-
/** List of comparison operators in a comparison */
134+
/** A list of comparison operators in a comparison */
135135
class CmpopList extends CmpopList_ { }
136136

137137
/** A comparison operator */

python/ql/lib/semmle/python/SelfAttribute.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ private predicate self_attribute(Attribute attr, Class cls) {
3131
)
3232
}
3333

34-
/** Helper class for UndefinedClassAttribute.ql & MaybeUndefinedClassAttribute.ql */
34+
/** A helper class for UndefinedClassAttribute.ql & MaybeUndefinedClassAttribute.ql */
3535
class SelfAttributeRead extends SelfAttribute {
3636
SelfAttributeRead() {
3737
this.getCtx() instanceof Load and

python/ql/lib/semmle/python/dataflow/new/SensitiveDataSources.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ private module SensitiveDataModeling {
227227
}
228228

229229
/**
230-
* Any kind of variable assignment (also including with/for) where the name indicates
230+
* A variable assignment (also including with/for) where the name indicates
231231
* it contains sensitive data.
232232
*
233233
* Note: We _could_ make any access to a variable with a sensitive name a source of

python/ql/lib/semmle/python/dataflow/new/TypeTracker.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
private import python
77
private import internal.TypeTracker as Internal
88

9-
/** Any string that may appear as the name of an attribute or access path. */
9+
/** A string that may appear as the name of an attribute or access path. */
1010
class AttributeName = Internal::ContentName;
1111

12-
/** Either an attribute name, or the empty string (representing no attribute). */
12+
/** An attribute name, or the empty string (representing no attribute). */
1313
class OptionalAttributeName = Internal::OptionalContentName;
1414

1515
/**
16-
* Summary of the steps needed to track a value to a given dataflow node.
16+
* The summary of the steps needed to track a value to a given dataflow node.
1717
*
1818
* This can be used to track objects that implement a certain API in order to
1919
* recognize calls to that API. Note that type-tracking does not by itself provide a

python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPrivate.qll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ newtype TDataFlowCallable =
613613
TLambda(Function lambda) { lambda.isLambda() } or
614614
TModule(Module m)
615615

616-
/** Represents a callable. */
616+
/** A callable. */
617617
abstract class DataFlowCallable extends TDataFlowCallable {
618618
/** Gets a textual representation of this element. */
619619
abstract string toString();
@@ -714,7 +714,7 @@ newtype TDataFlowCall =
714714
TClassCall(CallNode call) { call = any(ClassValue c | not c.isAbsent()).getACall() } or
715715
TSpecialCall(SpecialMethodCallNode special)
716716

717-
/** Represents a call. */
717+
/** A call. */
718718
abstract class DataFlowCall extends TDataFlowCall {
719719
/** Gets a textual representation of this element. */
720720
abstract string toString();
@@ -739,7 +739,7 @@ abstract class DataFlowCall extends TDataFlowCall {
739739
}
740740

741741
/**
742-
* Represents a call to a function/lambda.
742+
* A call to a function/lambda.
743743
* This excludes calls to bound methods, classes, and special methods.
744744
* Bound method calls and class calls insert an argument for the explicit
745745
* `self` parameter, and special method calls have special argument passing.
@@ -826,7 +826,7 @@ class ClassCall extends DataFlowCall, TClassCall {
826826
override DataFlowCallable getEnclosingCallable() { result.getScope() = call.getScope() }
827827
}
828828

829-
/** Represents a call to a special method. */
829+
/** A call to a special method. */
830830
class SpecialCall extends DataFlowCall, TSpecialCall {
831831
SpecialMethodCallNode special;
832832

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ abstract class AttributePath extends TAttributePath {
7979
predicate noAttribute() { this = TNoAttribute() }
8080
}
8181

82-
/** AttributePath for no attribute. */
82+
/** The `AttributePath` for no attribute. */
8383
class NoAttribute extends TNoAttribute, AttributePath {
8484
override string toString() { result = "no attribute" }
8585

@@ -88,7 +88,7 @@ class NoAttribute extends TNoAttribute, AttributePath {
8888
override AttributePath fromAttribute(string name) { none() }
8989
}
9090

91-
/** AttributePath for an attribute. */
91+
/** The `AttributePath` for an attribute. */
9292
class NamedAttributePath extends TAttribute, AttributePath {
9393
override string toString() {
9494
exists(string attr |
@@ -124,8 +124,8 @@ newtype TTaintTrackingNode =
124124
}
125125

126126
/**
127-
* Class representing the (node, context, path, kind) tuple.
128-
* Used for context-sensitive path-aware taint-tracking.
127+
* A class representing the (node, context, path, kind) tuple.
128+
* Used for context-sensitive path-aware taint-tracking.
129129
*/
130130
class TaintTrackingNode extends TTaintTrackingNode {
131131
/** Gets a textual representation of this element. */

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ abstract class TaintKind extends string {
180180
}
181181

182182
/**
183-
* Alias of `TaintKind`, so the two types can be used interchangeably.
183+
* An Alias of `TaintKind`, so the two types can be used interchangeably.
184184
*/
185185
class FlowLabel = TaintKind;
186186

@@ -561,7 +561,7 @@ module DataFlowExtension {
561561
ControlFlowNode getACalleeSuccessorNode(CallNode call) { none() }
562562
}
563563

564-
/** Data flow variable that modifies the basic data-flow. */
564+
/** A data flow variable that modifies the basic data-flow. */
565565
class DataFlowVariable extends EssaVariable {
566566
/**
567567
* Gets a successor node for data-flow.
@@ -608,7 +608,7 @@ private import semmle.python.pointsto.PointsTo
608608
*/
609609
module DataFlow {
610610
/**
611-
* Generic taint kind, source and sink classes for convenience and
611+
* The generic taint kind, source and sink classes for convenience and
612612
* compatibility with other language libraries
613613
*/
614614
class Extension = DataFlowExtension::DataFlowNode;

0 commit comments

Comments
 (0)