Add --strict-bytes flag by hamdanal · Pull Request #18263 · python/mypy (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation7 Commits2 Checks19 Files changed

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

hamdanal

@hamdanal

@github-actions GitHub Actions

This comment has been minimized.

@sterliakov

Could you (perhaps temporarily) enable this flag during primer runs? To quickly change that, there's --additional-flags param given to mypy_primer in .github/workflows/mypy_primer.yml. It'd be interesting to see the impact of this option on the open-source corpus.

@hamdanal

Could you (perhaps temporarily) enable this flag during primer runs? To quickly change that, there's --additional-flags param given to mypy_primer in .github/workflows/mypy_primer.yml. It'd be interesting to see the impact of this option on the open-source corpus.

See the primer hits here #12661

JukkaL

Choose a reason for hiding this comment

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

Thanks for the PR! Looks good, just one comment about documentation.

@hamdanal

@github-actions GitHub Actions

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

JukkaL

This was referenced

Dec 10, 2024

asvetlov pushed a commit to aio-libs/aiohttp that referenced this pull request

Dec 11, 2024

@cdce8p @bdraco

What do these changes do?

Mypy will add a --strict-bytes flag. python/mypy#18263

With that bytearray and memoryview are no longer subclasses of bytes and must be listed explicitly instead if they are supported.

Are there changes in behavior for the user?

--

--

Checklist


Co-authored-by: J. Nick Koston nick@koston.org

patchback bot pushed a commit to aio-libs/aiohttp that referenced this pull request

Dec 11, 2024

What do these changes do?

Mypy will add a --strict-bytes flag. python/mypy#18263

With that bytearray and memoryview are no longer subclasses of bytes and must be listed explicitly instead if they are supported.

Are there changes in behavior for the user?

--

--

Checklist


Co-authored-by: J. Nick Koston nick@koston.org (cherry picked from commit 3f07b1a)

patchback bot pushed a commit to aio-libs/aiohttp that referenced this pull request

Dec 11, 2024

What do these changes do?

Mypy will add a --strict-bytes flag. python/mypy#18263

With that bytearray and memoryview are no longer subclasses of bytes and must be listed explicitly instead if they are supported.

Are there changes in behavior for the user?

--

--

Checklist


Co-authored-by: J. Nick Koston nick@koston.org (cherry picked from commit 3f07b1a)

asvetlov pushed a commit to aio-libs/aiohttp that referenced this pull request

Dec 11, 2024

@patchback @cdce8p

…ation for strict-bytes (#10157)

This is a backport of PR #10154 as merged into master (3f07b1a).

What do these changes do?

Mypy will add a --strict-bytes flag. python/mypy#18263

With that bytearray and memoryview are no longer subclasses of bytes and must be listed explicitly instead if they are supported.

Are there changes in behavior for the user?

--

--

Checklist

Co-authored-by: Marc Mueller 30130371+cdce8p@users.noreply.github.com

asvetlov pushed a commit to aio-libs/aiohttp that referenced this pull request

Dec 11, 2024

@patchback @cdce8p

…ation for strict-bytes (#10158)

This is a backport of PR #10154 as merged into master (3f07b1a).

What do these changes do?

Mypy will add a --strict-bytes flag. python/mypy#18263

With that bytearray and memoryview are no longer subclasses of bytes and must be listed explicitly instead if they are supported.

Are there changes in behavior for the user?

--

--

Checklist

Co-authored-by: Marc Mueller 30130371+cdce8p@users.noreply.github.com