Skip to content

[CHORE]: Raise pylint from 9.16/10 -> 10/10 #210

@crivetimihai

Description

@crivetimihai

🔧 Chore Summary

Bring the project's pylint score up to a perfect 10/10 while keeping all tests and smoke-tests green.


🧱 Area Affected

  • Pre-commit hooks / linters
  • Build system or Makefile (make pylint, make autoflake, make isort, make black, make pre-commit)
  • GitHub Actions / CI

⚙️ Context / Rationale

A 10/10 score reduces tech debt and blocks regressions. Current failures are mainly no-value-for-parameter, wrong-import-order, and missing docstrings.


📦 Related Make Targets

Target Purpose
make autoflake Remove unused imports / vars
make isort Sort & group imports
make black Reformat code (PEP 8)
make pre-commit Run all configured hooks
make pylint Pylint static analysis
make lint Full lint meta-target
make test Unit / integration tests
make smoketest Minimal E2E sanity check

All bold targets are mandatory; CI must fail if any one does.


📋 Acceptance Criteria

  • make pylint prints 10.00/10 and exits 0.
  • make autoflake, make isort, make black, make pre-commit run clean with no diffs.
  • make test and make smoketest pass.
  • GitHub Actions enforces the above (e.g. --fail-under=10.0).
  • Changelog entry under "Maintenance".

🛠️ Task List (suggested)

  1. Triage pylint output; fix high-impact E**** first.
  2. Import order & unused symbols
    • Run make autoflake -> make isort -> make black to auto-fix bulk issues.
  3. Address remaining pylint warnings/errors; suppress only with justification.
  4. Run hooks locally: make pre-commit.
  5. Execute full test suite & smoke tests
  6. Test locally with make venv install install-dev test smoketest
  7. Test in containers make docker-prod docker-run-ssl-host
  8. Test with compose (Postgres + Redis) make compose-up after changing docker-compose.yaml to use :latest local image
  9. Test database migrations (alembic)
  10. Test with helm chart deployment in minikube - make minikube-install minikube-start and deploy the helm chart under charts/mcp-stack (see README)
  11. Test Pypi package builds and works well - make devpi-install devpi-init devpi-start devpi-clean and try mcpgateway
  12. Raise CI threshold to --fail-under=10.0.
  13. Commit with message chore(lint): achieve pylint 10/10.

🧩 Additional Notes

  • Duplicate-code warnings can be suppressed with a comment if refactor risk is high.
  • Keep commits small and self-contained; consider one per subsystem to ease review.

Metadata

Metadata

Labels

choreLinting, formatting, dependency hygiene, or project maintenance chorescicdIssue with CI/CD process (GitHub Actions, scaffolding)devopsDevOps activities (containers, automation, deployment, makefiles, etc)pythonPython / backend development (FastAPI)triageIssues / Features awaiting triage

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions