-
Notifications
You must be signed in to change notification settings - Fork 17
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
Identify code formatter to recommend for PSL projects #235
Comments
I don't know if we should require a code-formater, but I think using one in more PSL repositories would set a good example for new or prospective projects. I'm a big fan of I think it's up to the project and its contributors' preferences for line length. The 79 character line-length limit really grates on me. I prefer a limit of 90 or 100 characters. IMHO as long as the code isn't 125 or 150 characters and isn't trying to do to much, I don't mind. For example, I think this code in Tax-Calculator's PSLmodels/Tax-Calculator@5bf975d But, to each their own. I don't think @jdebacker and @rickecon use code-formatters so I'm curious to hear their takes. |
I should probably give Black a try. I've not found formatting my own code a chore (it's easy enough to follow stying guidelines as you go), but I have had some frustration on projects with others who obey no rules. It'd be great to auto-correct that work - or just get them using Black. I'll try to give it a go this week. |
Just checking in on this. I've come to habitually rely on |
I will try to give |
I'd vote to recommend (or even require) the
black
code formatter for PSL Python projects. An advantage ofblack
is that it defines a single best code format; it advertises itself as "uncompromising", removing the code author from any code formatting choices so they can focus on just coding. It's integrated to editors like VS Code and I've enjoyed using it over the past few months.We may also want to define a standard line length. I've been using
black
with 79 characters.The text was updated successfully, but these errors were encountered: