Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract some code from yaml test item #149

Merged

Conversation

delfick
Copy link
Contributor

@delfick delfick commented May 2, 2024

Hello,

I have some time to make #144 happen (and the need for this functionality).

I haven't got far into working out exactly how I'll make it happen, but I do believe it'll be easier if YamlTestItem is broken up a bit.

This PR is a refactor do do that. It should be a pure refactor and I believe the only real change is I do move execute_extension_hook to before the execution_path is created, as it currently does not know about that folder.

I want to make sure I'm not gonna be treading on any toes before going too far down this path!

This PR is best seen one commit at a time.

Prior to this a SystemExit exception could return the code as a string
or an integer, now we convert it to a sensible integer to return
It currently doesn't depend on the execution path existing, and we can
make sure this runs before we create that path and run anything
This is so we can abstract away what is involved in checking the mypy
output. This will also help when we extract running mypy so we don't
have to pass around the information that is only needed for this
check
This will make it easier for us to run mypy multiple times later on
This object glues together the creation of test files, the running of
mypy, and the checking of the result
Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine, thank you!

@sobolevn sobolevn merged commit 3995a96 into typeddjango:master May 2, 2024
21 checks passed
@delfick delfick deleted the refactor/extract-from-yaml-test-item branch May 3, 2024 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants