Skip to content

openpyxl: Use duck typing for workbook sheets#11718

Merged
srittau merged 6 commits into
python:mainfrom
Avasam:workbook-sheets-duck-typing
Apr 27, 2024
Merged

openpyxl: Use duck typing for workbook sheets#11718
srittau merged 6 commits into
python:mainfrom
Avasam:workbook-sheets-duck-typing

Conversation

@Avasam
Copy link
Copy Markdown
Collaborator

@Avasam Avasam commented Apr 4, 2024

Closes #11706

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

Comment thread stubs/openpyxl/openpyxl/workbook/workbook.pyi Outdated
Comment thread stubs/openpyxl/openpyxl/workbook/workbook.pyi Outdated
@Avasam Avasam requested a review from JelleZijlstra April 8, 2024 16:40
@github-actions

This comment has been minimized.

Copy link
Copy Markdown
Member

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

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

This is an interesting idea, but it feels like something that could well come back to bite us in the future. Any user who starts digging into the types is likely to end up confused.

I'm not completely opposed but I'd like to hear from other maintainers before we commit to this new technique.

@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@github-actions
Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

Copy link
Copy Markdown
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

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

Let's try this. I was bitten by this recently when installing types-openpyxl. Maybe this "poor man's AnyOf" (python/typing#566) will help.

@srittau srittau merged commit bdf7502 into python:main Apr 27, 2024
@Avasam Avasam deleted the workbook-sheets-duck-typing branch April 27, 2024 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

openpyxl: no attribute "column_dimensions"

3 participants