Files
semantic-kernel/python/semantic_kernel
Eduard van Valkenburg 1cf984cc99 Python: Enhanced pre commit and tasks (#5512)
### Motivation and Context

<!-- Thank you for your contribution to the semantic-kernel repo!
Please help reviewers and future users, providing the following
information:
  1. Why is this change required?
  2. What problem does it solve?
  3. What scenario does it contribute to?
  4. If it fixes an open issue, please link to the issue here.
-->
To further make the SK python robust and make it easier to get
high-quality PRs, some work on the pre-commit-config.yaml and adding a
mypy settings ini.

### Description

<!-- Describe your changes, the overall approach, the underlying design.
These notes will help understanding how your code works. Thanks! -->
Added two steps to the pre-commit-config, the first for pypy, the second
for tests with coverage.
Over time we want to mandate these checks to run against a PR before it
goes to github, that will also reduce the number of ruff and black fix
commits, and non-passing unit tests.

Added a mypy.ini, currently all but the root folder is excluded, so that
we can gradually introduce mypy coverage, did the first pieces in
kernel.py, including switch to new style annotations (using from
`__future__ import annotations`) in Kernel.


### Contribution Checklist

<!-- Before submitting this PR, please make sure: -->

- [x] The code builds clean without any errors or warnings
- [x] The PR follows the [SK Contribution
Guidelines](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md)
and the [pre-submission formatting
script](https://github.com/microsoft/semantic-kernel/blob/main/CONTRIBUTING.md#development-scripts)
raises no violations
- [x] All unit tests pass, and I have added new tests where possible
- [x] I didn't break anyone 😄
2024-03-19 20:20:09 +00:00
..
2024-03-14 14:59:10 +00:00