# Path: hgvs/exceptions.py
# class HGVSError(Exception):
#     pass
# 
# class HGVSUnsupportedOperationError(HGVSError):
#     pass


import attr
import hgvs
import six
    import doctest
from bioutils.sequences import aa_to_aa1, aa1_to_aa3
from hgvs.exceptions import HGVSError, HGVSUnsupportedOperationError





@attr.s(slots=True)
class Edit(object):
    def format(self, conf=None):
        return str(self)

    def _format_config_na(self, conf=None):
        max_ref_length = hgvs.global_config.formatting.max_ref_length
        if conf and "max_ref_length" in conf:
            max_ref_length = conf["max_ref_length"]
        return max_ref_length

    def _format_config_aa(self, conf=None):
        p_3_letter = hgvs.global_config.formatting.p_3_letter
        p_term_asterisk = hgvs.global_config.formatting.p_term_asterisk
        p_init_met = hgvs.global_config.formatting.p_init_met

        if conf and "p_3_letter" in conf and conf["p_3_letter"] is not None:
            p_3_letter = conf["p_3_letter"]
        if conf and "p_term_asterisk" in conf and conf["p_term_asterisk"] is not None:
            p_term_asterisk = conf["p_term_asterisk"]
        if conf and "p_init_met" in conf and conf["p_init_met"] is not None:
            p_init_met = conf["p_init_met"]
        return p_3_letter, p_term_asterisk, p_init_met

    def _del_ins_lengths(self, ilen):

# Path: hgvs/exceptions.py
# class HGVSError(Exception):
#     pass
# 
# class HGVSUnsupportedOperationError(HGVSError):
#     pass


# Path: hgvs/edit.py
import attr
import hgvs
import six
    import doctest
from bioutils.sequences import aa_to_aa1, aa1_to_aa3
from hgvs.exceptions import HGVSError, HGVSUnsupportedOperationError






@attr.s(slots=True)
class Edit(object):
    def format(self, conf=None):
        return str(self)

    def _format_config_na(self, conf=None):
        max_ref_length = hgvs.global_config.formatting.max_ref_length
        if conf and "max_ref_length" in conf:
            max_ref_length = conf["max_ref_length"]
        return max_ref_length

    def _format_config_aa(self, conf=None):
        p_3_letter = hgvs.global_config.formatting.p_3_letter
        p_term_asterisk = hgvs.global_config.formatting.p_term_asterisk
        p_init_met = hgvs.global_config.formatting.p_init_met

        if conf and "p_3_letter" in conf and conf["p_3_letter"] is not None:
            p_3_letter = conf["p_3_letter"]
        if conf and "p_term_asterisk" in conf and conf["p_term_asterisk"] is not None:
            p_term_asterisk = conf["p_term_asterisk"]
        if conf and "p_init_met" in conf and conf["p_init_met"] is not None:
            p_init_met = conf["p_init_met"]
        return p_3_letter, p_term_asterisk, p_init_met

    def _del_ins_lengths(self, ilen):

        raise HGVSUnsupportedOperationError(