jamesscottbrown / pyyed

A simple Python library to export networks to yEd
BSD 3-Clause "New" or "Revised" License
81 stars 37 forks source link

copy paste not modified error in warning #17

Closed pjljvandelaar closed 5 years ago

pjljvandelaar commented 5 years ago

Starting from https://github.com/jamesscottbrown/pyyed/blob/bb2af0f1e9ae0a9e1a17b20f553a32b3fcd6d333/pyyed/__init__.py#L222 is written

        if arrowhead not in arrow_types:
            raise RuntimeWarning("Arrowhead type %s not recognised" % arrowhead)

        self.arrowhead = arrowhead

        if arrowfoot not in arrow_types:
            raise RuntimeWarning("Arrowhead type %s not recognised" % arrowfoot)

        self.arrowfoot = arrowfoot

        if line_type not in line_types:
            raise RuntimeWarning("Edge type %s not recognised" % line_type)

yet it should be

        if arrowhead not in arrow_types:
            raise RuntimeWarning("Arrowhead type %s not recognised" % arrowhead)

        self.arrowhead = arrowhead

        if arrowfoot not in arrow_types:
            raise RuntimeWarning("Arrowfoot type %s not recognised" % arrowfoot)

        self.arrowfoot = arrowfoot

        if line_type not in line_types:
            raise RuntimeWarning("Line type %s not recognised" % line_type)

in other words, Arrowfoot and Line type should be used in the last two warnings!

jamesscottbrown commented 5 years ago

Thanks for pointing this out.