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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[enhancement] Define wrapper functions for click's echo function #234

Open
hkmatsumoto opened this issue Dec 28, 2019 · 2 comments
Open

Comments

@hkmatsumoto
Copy link
Contributor

Current Implementation:

We are calling click's echo function directly each time we call it.

The implementation I propose:

Instead of calling it directly, It sounds good to define wrapper functions like

def print_error(message, bold=True):
	echo(
		style(
			message,
			bold=bold,
			fg="red"
		)
	)

def print_success(message, bold=True):
	echo(
		style(
			message,
			bold=bold,
			fg="green"
		)
	)

and call them to make the codes more descriptive.

@ShubhamPandey28
Copy link

Can I take this and solve along with #243?

@hkmatsumoto
Copy link
Contributor Author

@ShubhamPandey28 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

No branches or pull requests

2 participants