fix: resolve all 20 ruff lint errors in Evolve notebook#31
Merged
Conversation
- Remove unused imports (json, traceback, textwrap, Any, field, display, HTML, clear_output) - Sort import blocks (I001) - Use collections.abc.Callable instead of typing.Callable (UP035) - Use X | Y syntax in isinstance and Optional types (UP038, RUF013) - Use explicit conversion flag instead of str() (RUF010) - Remove f-string without placeholders (F541) - Add noqa comments for intentional exec() usage (S102) and random (S311) - Auto-format notebook with ruff format
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes all 20 ruff lint errors that were causing CI to fail on the
Lint & Type-checkjob.All errors were in a single file:
Evolve_Code_Evolution_Engine.ipynbChanges
Auto-fixed (17 errors)
json,traceback,textwrap,Any,field,display,HTML,clear_output)Callablefromcollections.abcinstead oftypingstr | Noneinstead of implicitOptionalX | Yinisinstancecallruff formatSuppressed with noqa (3 errors)
exec()usage is intentional for dynamic code evaluation in the evolution enginerandom.randint()is used for test data generation, not cryptographic purposesVerification