PyVCF icon indicating copy to clipboard operation
PyVCF copied to clipboard

expose model.Record

Open jstjohn opened this issue 7 years ago • 1 comments

This allows for nice things like type annotations for functions that accept a Record as well as users building dummy Record objects for testing.

For example I can now do this in pycharm and I get auto-completion on the members of Record.

import vcf


def my_record_func(record: vcf.Record):
    """
    :param record: A Record object
    :return: bool
    """
    return 'C' in record.ALT

jstjohn avatar Mar 15 '17 19:03 jstjohn

This looks really good; small, well explained, practical. Nice PR.

nathanielknight avatar Nov 08 '17 20:11 nathanielknight