GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Python: Add `toString` information for all classes without such. · github/codeql@c525ab3

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • python/ql/src
    • external
      • CodeDuplication.qll
    • semmle/python
      • Exprs.qll
      • Keywords.qll
      • pointsto
        • PointsTo.qll
      • types
        • Extensions.qll
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎python/ql/src/external/CodeDuplication.qll‎

Copy file name to clipboardExpand all lines: python/ql/src/external/CodeDuplication.qll
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class Copy extends @duplication_or_similarity
9393
}
9494

9595
/** Gets a textual representation of this element. */
96-
string toString() { none() }
96+
string toString() { result = "Copy" }
9797

9898
/**
9999
* Gets a block that extends this one, that is, its first token is also
Collapse file

‎python/ql/src/semmle/python/Exprs.qll‎

Copy file name to clipboardExpand all lines: python/ql/src/semmle/python/Exprs.qll
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ abstract class Num extends Num_, ImmutableLiteral {
419419

420420
/* We want to declare this abstract, but currently we cannot. */
421421
override string toString() {
422-
none()
422+
result = "Num with missing toString"
423423
}
424424

425425
}
Collapse file

‎python/ql/src/semmle/python/Keywords.qll‎

Copy file name to clipboardExpand all lines: python/ql/src/semmle/python/Keywords.qll
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ abstract class DictUnpackingOrKeyword extends DictItem {
6060
abstract Expr getValue();
6161

6262
override string toString() {
63-
none()
63+
result = "DictUnpackingOrKeyword with missing toString"
6464
}
6565

6666
}
@@ -70,7 +70,7 @@ abstract class DictDisplayItem extends DictItem {
7070
abstract Expr getValue();
7171

7272
override string toString() {
73-
none()
73+
result = "DictDisplayItem with missing toString"
7474
}
7575

7676
}
Collapse file

‎python/ql/src/semmle/python/pointsto/PointsTo.qll‎

Copy file name to clipboardExpand all lines: python/ql/src/semmle/python/pointsto/PointsTo.qll
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ library class CfgOrigin extends @py_object {
1313

1414
string toString() {
1515
/* Not to be displayed */
16-
none()
16+
result = "CfgOrigin"
1717
}
1818

1919
/** Get a `ControlFlowNode` from `this` or `here`.
@@ -68,7 +68,7 @@ module CfgOrigin {
6868
//
6969
// string toString() {
7070
// /* Not to be displayed */
71-
// none()
71+
// result = "CfgOrigin"
7272
// }
7373
//
7474
// /** Get a `ControlFlowNode` from `this` or `here`.
Collapse file

‎python/ql/src/semmle/python/types/Extensions.qll‎

Copy file name to clipboardExpand all lines: python/ql/src/semmle/python/types/Extensions.qll
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import semmle.python.objects.ObjectInternal
2020

2121
abstract class PointsToExtension extends @py_flow_node {
2222

23-
string toString() { none() }
23+
string toString() { result = "PointsToExtension with missing toString" }
2424

2525
abstract predicate pointsTo(Context context, ObjectInternal value, ControlFlowNode origin);
2626

@@ -36,7 +36,7 @@ abstract class PointsToExtension extends @py_flow_node {
3636
/** DEPRECATED -- Use PointsToExtension instead */
3737
deprecated abstract class CustomPointsToFact extends @py_flow_node {
3838

39-
string toString() { none() }
39+
string toString() { result = "CustomPointsToFact with missing toString" }
4040

4141
abstract predicate pointsTo(Context context, Object value, ClassObject cls, ControlFlowNode origin);
4242

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.