Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: typhints, formatting; fix: don't print newline when bolding #3

Merged
merged 2 commits into from Sep 29, 2021
Merged

chore: typhints, formatting; fix: don't print newline when bolding #3

merged 2 commits into from Sep 29, 2021

Conversation

hexiro
Copy link
Contributor

@hexiro hexiro commented Sep 29, 2021

馃憤馃徏 looks pretty good.

suggested api changes:

import iridi

# could be iridi.print()
iridi.beautify("Looks beautiful, huh?", ["#8A2387", "#E94057", "#F27121"])

wiretap = iridi.preset(["#8A2387", "#E94057", "#F27121"])
wiretap.beautify("Smile for the camera!")

lmk what you think!

@cnrad
Copy link
Owner

cnrad commented Sep 29, 2021

I do like the API suggestions (I'll see what I can do with them, since I do want to expand this project a bit), and regarding the PR I actually did not know that things in Python were typeable 馃拃馃拃馃拃

Thanks for cleaning up iridi.py

@cnrad cnrad merged commit e79e239 into cnrad:master Sep 29, 2021
@hexiro hexiro deleted the Hexiro-patch-1 branch September 29, 2021 16:42
@hexiro
Copy link
Contributor Author

hexiro commented Sep 29, 2021

yeah no worries. they're called typehints and they're purely for the developer, as the interpreter doesn't do anything with them. Instead of Dict[str, int] you might actually be able to do something with typing.Literal so like Dict[Union[Literal["r"], Literal["g"], Literal["b"]], int] but i'm not sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants