ansasaki / abimap

A helper for library maintainers to use symbol versioning
MIT License
7 stars 1 forks source link

confusing use of join() #44

Closed tomato42 closed 6 years ago

tomato42 commented 6 years ago

https://github.com/ansasaki/smap/blob/608f590b98a1ad2e12c078974eafeef8f4aa58fa/src/smap/symver.py#L93-L101

I feel like this would be more readable:

content = ("In file {0.filename}, line {1}, column {0.column}: {0.message}\n"
           "{0.context}"
           "{2:>{0.column}}").format(self, self.line + 1, '^')

(also, does context really include newlines?)

Same issue: https://github.com/ansasaki/smap/blob/608f590b98a1ad2e12c078974eafeef8f4aa58fa/src/smap/symver.py#L435

Similarly: https://github.com/ansasaki/smap/blob/608f590b98a1ad2e12c078974eafeef8f4aa58fa/src/smap/symver.py#L458-L461

msg = ("Circular dependency detected!\n"
       "    {0}").format("->".join(current + [dep]))