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

types-openpyxl / worksheet.pyi / class Worksheet / method Cell / incorrect type for the value parameter #10952

Closed
Questionsdenombres opened this issue Oct 30, 2023 · 3 comments
Labels
stubs: false positive Type checkers report false errors

Comments

@Questionsdenombres
Copy link

Used versions

  • types-openpyxl==3.1.0.24
  • openpyxl==3.1.2

Declared type

File worksheet.pyi:

def cell(self, row: int, column: int, value: str | None = None) -> Cell: ...

Docstring of the "cell"method

File worksheet.py:

    def cell(self, row, column, value=None):
        """
        Returns a cell object based on the given coordinates.

        Usage: cell(row=15, column=1, value=5)

        Calling `cell` creates cells in memory when they
        are first accessed.

        :param row: row index of the cell (e.g. 4)
        :type row: int

        :param column: column index of the cell (e.g. 3)
        :type column: int

        :param value: value of the cell (e.g. 5)
        :type value: numeric or time or string or bool or none

        :rtype: openpyxl.cell.cell.Cell
        """

Mismatch

str | None versus numeric or time or string or bool or none

Thanks for your great Job !
Patrick - Paris, France.

@srittau srittau added the stubs: false positive Type checkers report false errors label Oct 31, 2023
@srittau
Copy link
Collaborator

srittau commented Oct 31, 2023

PR welcome!

@Avasam
Copy link
Collaborator

Avasam commented Nov 1, 2023

FWIW there's some Cell value related changes in https://github.com/python/typeshed/pull/9511/files#diff-dabc24e406450b802c51dd6c9d1062ac0fed975dc4daef0e9cbe468aedcb6978R91 , so this should be fixed once I extract and complete Cell-related changes. But no ETA on that, feel free to open a PR specific for your needs.

@max-muoto
Copy link
Contributor

@srittau This seems like it's fixed post: #12363

@srittau srittau closed this as completed Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stubs: false positive Type checkers report false errors
Projects
None yet
Development

No branches or pull requests

4 participants