| { |
| "$schema": "https://json.schemastore.org/sarif-2.1.0.json", |
| "version": "2.1.0", |
| "runs": [ |
| { |
| "tool": { |
| "driver": { |
| "name": "Pyrefly", |
| "version": "0.0.0", |
| "informationUri": "https://pyrefly.org/", |
| "rules": [ |
| { |
| "id": "bad-assignment", |
| "name": "bad-assignment", |
| "helpUri": "https://pyrefly.org/en/docs/error-kinds/#bad-assignment", |
| "defaultConfiguration": { |
| "level": "error" |
| } |
| }, |
| { |
| "id": "division-by-zero", |
| "name": "division-by-zero", |
| "helpUri": "https://pyrefly.org/en/docs/error-kinds/#division-by-zero", |
| "defaultConfiguration": { |
| "level": "warning" |
| } |
| }, |
| { |
| "id": "redundant-cast", |
| "name": "redundant-cast", |
| "helpUri": "https://pyrefly.org/en/docs/error-kinds/#redundant-cast", |
| "defaultConfiguration": { |
| "level": "warning" |
| } |
| }, |
| { |
| "id": "reveal-type", |
| "name": "reveal-type", |
| "helpUri": "https://pyrefly.org/en/docs/error-kinds/#reveal-type", |
| "defaultConfiguration": { |
| "level": "note" |
| } |
| } |
| ] |
| } |
| }, |
| "columnKind": "unicodeCodePoints", |
| "results": [ |
| { |
| "ruleId": "bad-assignment", |
| "ruleIndex": 0, |
| "level": "error", |
| "message": { |
| "text": "`Literal[0]` is not assignable to `str`" |
| }, |
| "locations": [ |
| { |
| "physicalLocation": { |
| "artifactLocation": { |
| "uri": "diagnostics.py" |
| }, |
| "region": { |
| "startLine": 8, |
| "startColumn": 10, |
| "endLine": 8, |
| "endColumn": 11 |
| } |
| } |
| } |
| ], |
| "relatedLocations": [ |
| { |
| "physicalLocation": { |
| "artifactLocation": { |
| "uri": "diagnostics.py" |
| }, |
| "region": { |
| "startLine": 8, |
| "startColumn": 4, |
| "endLine": 8, |
| "endColumn": 7 |
| } |
| }, |
| "message": { |
| "text": "declared type" |
| } |
| } |
| ] |
| }, |
| { |
| "ruleId": "division-by-zero", |
| "ruleIndex": 1, |
| "level": "warning", |
| "message": { |
| "text": "Cannot divide by zero: `/` with a literal zero divisor" |
| }, |
| "locations": [ |
| { |
| "physicalLocation": { |
| "artifactLocation": { |
| "uri": "diagnostics.py" |
| }, |
| "region": { |
| "startLine": 9, |
| "startColumn": 7, |
| "endLine": 9, |
| "endColumn": 12 |
| } |
| } |
| } |
| ] |
| }, |
| { |
| "ruleId": "reveal-type", |
| "ruleIndex": 3, |
| "level": "note", |
| "message": { |
| "text": "revealed type: str" |
| }, |
| "locations": [ |
| { |
| "physicalLocation": { |
| "artifactLocation": { |
| "uri": "diagnostics.py" |
| }, |
| "region": { |
| "startLine": 10, |
| "startColumn": 12, |
| "endLine": 10, |
| "endColumn": 15 |
| } |
| } |
| } |
| ] |
| }, |
| { |
| "ruleId": "bad-assignment", |
| "ruleIndex": 0, |
| "level": "error", |
| "message": { |
| "text": "`Mismatched` is not assignable to `Comparable`\n`Mismatched.compare` has type `() -> str`, which is not assignable to `() -> int`, the type of `Comparable.compare`" |
| }, |
| "locations": [ |
| { |
| "physicalLocation": { |
| "artifactLocation": { |
| "uri": "diagnostics.py" |
| }, |
| "region": { |
| "startLine": 22, |
| "startColumn": 26, |
| "endLine": 22, |
| "endColumn": 38 |
| } |
| } |
| } |
| ], |
| "relatedLocations": [ |
| { |
| "physicalLocation": { |
| "artifactLocation": { |
| "uri": "diagnostics.py" |
| }, |
| "region": { |
| "startLine": 22, |
| "startColumn": 13, |
| "endLine": 22, |
| "endColumn": 23 |
| } |
| }, |
| "message": { |
| "text": "declared type" |
| } |
| } |
| ] |
| }, |
| { |
| "ruleId": "redundant-cast", |
| "ruleIndex": 2, |
| "level": "error", |
| "message": { |
| "text": "Redundant cast: `int` is the same type as `int`" |
| }, |
| "locations": [ |
| { |
| "physicalLocation": { |
| "artifactLocation": { |
| "uri": "diagnostics.py" |
| }, |
| "region": { |
| "startLine": 32, |
| "startColumn": 17, |
| "endLine": 32, |
| "endColumn": 29 |
| } |
| } |
| } |
| ] |
| } |
| ] |
| } |
| ] |
| } |