chore: add type annotation to Bio/File.py by szabgab · Pull Request #5088 · biopython/biopython

Skip to content

Navigation Menu

Sign in

Appearance settings

Conversation

@szabgab

  • I hereby agree to dual licence this and any previous contributions under both
    the Biopython License Agreement AND the BSD 3-Clause License.

  • I have read the CONTRIBUTING.rst file, have run pre-commit
    locally, and understand that continuous integration checks will be used to
    confirm the Biopython unit tests and style checks pass with these changes.

  • I have added my name to the alphabetical contributors listings in the files
    NEWS.rst and CONTRIB.rst as part of this pull request, am listed
    already, or do not wish to be listed. (This acknowledgement is optional.)

Addresses #2236 and does not touch files that are addressed in #5057

@peterjc

That's just a tiny fraction of the module - and a private bit of the API too - did you do more but forgot to push the work to GitHub?

@szabgab

I thought smaller PRs would make it easier to review and accept.

@peterjc

For type annotation, please do at least a whole file. Or most of it.

@szabgab

OK. I have made some progress. This still needs more work.

peterjc


from typing_extensions import TypeAlias
from typing import Callable
from _typeshed import FileDescriptorOrPath

Choose a reason for hiding this comment

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

That's not in the standard library - see ModuleNotFoundError: No module named '_typeshed' errors in the CI testing.

2 participants

@szabgab @peterjc