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

gh-109413: Enable strict_optional for libregrtest/main.py #126394

Merged
merged 4 commits into from
Nov 13, 2024

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Nov 4, 2024

I also enabled return error code and fix two problems with it.
I decided to split strict_optional PRs based on modules for easier reviews :)

Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

Nice!

Lib/test/libregrtest/main.py Outdated Show resolved Hide resolved
Lib/test/libregrtest/main.py Outdated Show resolved Hide resolved
Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

Thanks!


@property
def tmp_dir(self) -> StrPath:
assert self._tmp_dir is not None, (
Copy link
Member

Choose a reason for hiding this comment

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

Please replace asssert with if+raise.

Lib/test/libregrtest/main.py Outdated Show resolved Hide resolved
Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

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

LGTM

@sobolevn sobolevn merged commit 12ca7e6 into python:main Nov 13, 2024
42 checks passed
@miss-islington-app
Copy link

Thanks @sobolevn for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry, @sobolevn, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 12ca7e622ff21ba3b7c90c62be6f6f82d543f25b 3.13

@sobolevn
Copy link
Member Author

I will do a manual backport in a moment.
Thanks everyone!

@bedevere-app
Copy link

bedevere-app bot commented Nov 13, 2024

GH-126802 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Nov 13, 2024
sobolevn added a commit to sobolevn/cpython that referenced this pull request Nov 13, 2024
…n.py` (pythonGH-126394)

(cherry picked from commit 12ca7e6)

Co-authored-by: sobolevn <mail@sobolevn.me>
sobolevn added a commit that referenced this pull request Nov 14, 2024
picnixz pushed a commit to picnixz/cpython that referenced this pull request Dec 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants