Skip to content

Apply ruff lint fixes across codebase#209

Open
rajeee wants to merge 6 commits intoruff_formatfrom
ruff_lint
Open

Apply ruff lint fixes across codebase#209
rajeee wants to merge 6 commits intoruff_formatfrom
ruff_lint

Conversation

@rajeee
Copy link
Collaborator

@rajeee rajeee commented Feb 3, 2026

Summary

This PR builds on top of PR #207 (ruff formatting) to also apply all ruff lint fixes to the codebase.

  • Remove unused imports (F401) in scripts and modules
  • Add __all__ lists to __init__.py files to document public API and fix re-export warnings
  • Replace star import in test_equipment.py with explicit imports (fixes F403/F405)
  • Fix bare except clause in docs/source/conf.py (E722 -> except Exception:)
  • Remove unused local variables (F841) or add noqa for intentional ones
  • Add noqa comments for acceptable lint exceptions (E402, E741, F403)

Lint Status

Before: 107 errors
After: 0 errors (all checks pass!)

Test Status

All 237 tests pass (1 skipped).

How to run

# Check for lint errors (should show 0 errors)
ruff check .

# Auto-fix any future lint issues
ruff check --fix .

Notes

  • Some variables like heating_des_init and cooling_des_init in ochre/utils/equipment.py are kept with # noqa: F841 because they're used dynamically by eval() when loading zone temperature files
  • The star import from .Equipment import * in ochre/__init__.py is kept for API compatibility with # noqa: F403

- Remove unused imports (F401) in scripts and modules
- Add __all__ lists to __init__.py files to document public API
- Replace star import in test_equipment.py with explicit imports
- Fix bare except clause in docs/source/conf.py (E722)
- Remove unused local variables (F841) or add noqa for intentional ones
- Add noqa comments for acceptable lint exceptions (E402, E741, F403)
- All 237 tests pass (1 skipped)
@rajeee rajeee requested a review from jmaguire1 February 3, 2026 18:44
@NatLabRockies NatLabRockies deleted a comment from Copilot AI Feb 4, 2026
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.

2 participants