Implement strict type checking and add missing type hints
Summary Implement strict type checking for backend and add missing type hints
Motivation Most parts of the backend already have type hints. Having complete type hints everywhere is required by (or at least supports) future improvements like autogenerated diagrams and documentation. Also it can increase the understanding of the code and improve code quality & consistency.
To achieve consistent type checking everywhere it is neccessary to add a type checker / linter to the CI pipeline / pre-commit hooks.
Technical Design
- Add a type checker / linter to the CI pipeline / pre-commit hooks.
- Add missing type hints / fix all existing findings of the type checker to have a clean baseline
Alternatives to Consider Alternative is to not add a type checker (yet), to keep a low barrier of entry for new commits (conflict: development speed vs. code quality)
Additional context Tools like py2puml rely on type hints to generate code diagrams for documentation, and require manual modifications if the type hints are not correct/complete
This would also be a good first issue, as it doesn't require deep understanding of the project
👍 agree, this would be great
This issue doesn't seem to be in development yet. I'm ready to take it on. I guess some confirmation from the team is needed?
Go for it!
This issue doesn't seem to be in development yet. I'm ready to take it on. I guess some confirmation from the team is needed?
Hey Omut, it seems the issue can be broken up into multiple parts. Can I join you in developing this?
Can I join you in developing this?
Hi @therohanrao I'm actively working on type checking with mypy. You can take linter part - ruff is already configured in CI, not sure about pre-commit hooks.
https://github.com/OpenDevin/OpenDevin/pull/958