-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix stubs #11
Conversation
@@ -66,7 +66,7 @@ class item: | |||
Retrieves the number of sub items. | |||
""" | |||
|
|||
def get_receipients(self) -> item: | |||
def get_recipients(self) -> item: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def get_size(self) -> int: ... | ||
def read_buffer(self, n: int) -> bytes: ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -89,3 +89,7 @@ class item: | |||
""" | |||
Retrieves a specific attachment | |||
""" | |||
|
|||
def get_embedded_attachment(self, attachment_index: int) -> attachment: ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
stubs/pyproject.toml
Outdated
@@ -6,5 +6,5 @@ build-backend = "setuptools.build_meta" | |||
name = "pypff-stubs" | |||
# The major version should match the version in `configure.ac`'s `AC_INIT` | |||
# with the minor version incremented as needed for new changes. | |||
version = "20240608.0" | |||
version = "20240608.1rc1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once this is reviewed, I can change this to
version = "20240608.1rc1" | |
version = "20240608.1" |
and bump the version in https://github.com/Everlaw/servers/pull/37520.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked that using these new stubs produces what I'd expect:
$ mypy src/tools/pst/
src/tools/pst/handler/impls/attachment.py:158: error: Unused "type: ignore" comment [unused-ignore]
get_size = ty.cast(ty.Callable[[], int], attach.get_size) # type: ignore[attr-defined]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/tools/pst/handler/impls/attachment.py:159: error: Unused "type: ignore" comment [unused-ignore]
read_buffer = ty.cast(ty.Callable[[int], bytes], attach.read_buffer) # type: ignore[attr-defined]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/tools/pst/handler/impls/attachment.py:261: error: Unused "type: ignore" comment [unused-ignore]
item.get_embedded_attachment, # type: ignore[attr-defined]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/tools/pst/handler/impls/appt.py:284: error: Unused "type: ignore" comment [unused-ignore]
item.get_recipients(), # type: ignore[attr-defined]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/tools/pst/handler/impls/eml.py:71: error: Unused "type: ignore" comment [unused-ignore]
item.get_recipients(), # type: ignore[attr-defined]
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Found 5 errors in 3 files (checked 15 source files)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
255b8f7 - force-pushing that in..
LGTM! Go ahead and update/merge whenever you're ready. |
I noticed some incorrect annotations while working on https://github.com/Everlaw/servers/pull/37520.