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

Better linting in the codebase #469

Open
JeanKossaifi opened this issue Dec 29, 2022 · 2 comments
Open

Better linting in the codebase #469

JeanKossaifi opened this issue Dec 29, 2022 · 2 comments

Comments

@JeanKossaifi
Copy link
Member

We recently added Black to enforce linting in the codebase, thanks to @j6k4m8 and @aarmey . In hindsight, it makes a lot of sense in most places but I really dislike the way it forces us to format things in some cases, sometimes going against pep8. The main reason is that it makes code less readable in those cases, going against the very reason behind using a linter.

I suggest either:

  • applying Black only on changed files in PRs and choosing to deviate from it or
  • switching to another linter such as flake8
@aarmey
Copy link
Contributor

aarmey commented Dec 29, 2022

One vote here for switching to a different linter, rather than limiting the code over which it is applied. Enforcing consistent formatting often greatly simplifies diff views; I find this very helpful.

@cohenjer
Copy link
Contributor

cohenjer commented Jan 4, 2023

@JeanKossaifi Could you spot a few places where the black formatting does not work for you? It could help us choose a new linter, or maybe modify some options of the black linter itself.

I have no particular attachment to a particular linter but I like the way the code is easy to read since the black linter PR.

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

3 participants