Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Accept additional string formatting styles in sankey #19133

Closed
@CharlesHe16

Description

@CharlesHe16

Currently, Sankey class accepts number formatting for labels using the old printf string formatting.

I think the relevant line is here:

quantity = self.format % abs(number) + self.unit

F-strings seem to be preferred over this format (you probably know this already but here's some reasons). A specific reason is that I can't easily use thousands separator with the old printf format, while this is trivial with f-strings.

I can rewrite this pretty easily by changing the parameter to format for an f string, as described here.

Can I put in a pull request thingy? Or is there a particular reason for this old format?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Good first issueOpen a pull request against these issues if there are no active ones!New feature

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions