-
Notifications
You must be signed in to change notification settings - Fork 435
Tolerate NoSourceCodeSeen errors for CCR
#3411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
7aedbb5 to
5f4d056
Compare
|
|
||
| import ruamel.yaml | ||
| from ruamel.yaml.scalarstring import SingleQuotedScalarString | ||
| from ruamel.yaml.scalarstring import SingleQuotedScalarString, FoldedScalarString, LiteralScalarString |
Check notice
Code scanning / CodeQL
Unused import Note
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 7 hours ago
To fix the problem, remove the unused symbol from the import statement so that only actually used names are imported. This keeps the dependency on ruamel.yaml.scalarstring but avoids binding names that are never referenced.
Specifically, in pr-checks/sync.py, at the import on line 4, delete FoldedScalarString from the list of imported names. Leave the rest of the file unchanged. No new methods, imports, or definitions are required; we are only narrowing an existing import to the names that are (or may be) used: SingleQuotedScalarString and LiteralScalarString.
-
Copy modified line R4
| @@ -1,7 +1,7 @@ | ||
| #!/usr/bin/env python | ||
|
|
||
| import ruamel.yaml | ||
| from ruamel.yaml.scalarstring import SingleQuotedScalarString, FoldedScalarString, LiteralScalarString | ||
| from ruamel.yaml.scalarstring import SingleQuotedScalarString, LiteralScalarString | ||
| import pathlib | ||
| import os | ||
|
|
This PR changes the
analyzeaction to tolerateRisk assessment
For internal use only. Please select the risk level of this change:
Which use cases does this change impact?
Workflow types:
dynamicworkflows (Default Setup, CCR, ...).Products:
Environments:
github.comand/or GitHub Enterprise Cloud with Data Residency.How did/will you validate this change?
.test.tsfiles).pr-checks).If something goes wrong after this change is released, what are the mitigation and rollback strategies?
How will you know if something goes wrong after this change is released?
Are there any special considerations for merging or releasing this change?
Merge / deployment checklist