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

packing function call lines #49

Open
timmyimprint opened this issue Jan 21, 2022 · 1 comment
Open

packing function call lines #49

timmyimprint opened this issue Jan 21, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@timmyimprint
Copy link

Thank you for this great library!

I have a request for an option to wrap long function calls. I like the current way of handling chaining method calls. But it seems if one function call gets too long for a given, length then it will stack all the arguments with each getting its own new line. I would like to pack as many argument into one line before wrapping to the next line instead of stacking. I have code that does a lot of error handling and I am finding that lots of my vertical screen real estate is getting taken up by error handling by argument stacking.

So instead of this:

		impl.stats.FuncError(
			example,
			with9999999,
			"argument",
			stacking101010101010,
			isThereAnywayToPackThemOnOneLine(err),
                        helloWorld,
		)

I want to do this:

		impl.stats.FuncError(example, with9999999, "argument", stacking101010101010,
			isThereAnywayToPackThemOnOneLine(err), helloWorld
		)

I like how you stack map values. I'm using v0.6.0.

@yolken-segment
Copy link
Contributor

Thanks for the feedback here. Although I prefer the current layout, we could definitely add a flag for users to opt-in to the more compressed one. I believe that it's actually a pretty challenging change to make, but this requires more investigation to verify.

I'll leave this request open as a TODO in case someone wants to dig in more.

@yolken-segment yolken-segment added the enhancement New feature or request label Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants