Skip to content

fix: resolve all 20 ruff lint errors in Evolve notebook#31

Merged
cohen-liel merged 1 commit into
mainfrom
fix/lint-errors
Mar 29, 2026
Merged

fix: resolve all 20 ruff lint errors in Evolve notebook#31
cohen-liel merged 1 commit into
mainfrom
fix/lint-errors

Conversation

@cohen-liel
Copy link
Copy Markdown
Owner

Summary

Fixes all 20 ruff lint errors that were causing CI to fail on the Lint & Type-check job.

All errors were in a single file: Evolve_Code_Evolution_Engine.ipynb

Changes

Auto-fixed (17 errors)

  • F401 (7): Removed unused imports (json, traceback, textwrap, Any, field, display, HTML, clear_output)
  • I001 (3): Sorted import blocks
  • UP035 (1): Import Callable from collections.abc instead of typing
  • RUF013 (2): Use str | None instead of implicit Optional
  • UP038 (1): Use X | Y in isinstance call
  • F541 (1): Remove f-string without placeholders
  • Formatting: Auto-formatted with ruff format

Suppressed with noqa (3 errors)

  • S102 (1): exec() usage is intentional for dynamic code evaluation in the evolution engine
  • S311 (2): random.randint() is used for test data generation, not cryptographic purposes

Verification

$ ruff check .
All checks passed!

$ ruff format --check .
121 files already formatted

- 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
@cohen-liel cohen-liel merged commit 7beba01 into main Mar 29, 2026
3 checks passed
@cohen-liel cohen-liel deleted the fix/lint-errors branch March 29, 2026 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant