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

Design and enforce linting standards #962

Open
krivard opened this issue Aug 26, 2022 · 4 comments · May be fixed by #1328
Open

Design and enforce linting standards #962

krivard opened this issue Aug 26, 2022 · 4 comments · May be fixed by #1328

Comments

@krivard
Copy link
Contributor

krivard commented Aug 26, 2022

https://github.com/cmu-delphi/covidcast-indicators has nice linting requirements (here is an example pylint file), and we deserve nice things over here too.

To do it the same way that indicators does, we'd need to either figure out how to lint a mixed tree of python files or convert acquisition and server to actual legit python modules. Then we just add pylint commands to CI.

We don't have to do it the same way that indicators does though. Alternatives?

@dshemetov
Copy link
Contributor

dshemetov commented Aug 27, 2022

Looking at the pylint docs, it looks like they really leave you on your own when your files aren't packaged. This somewhat hacky solution might just get the job done though. Can't really think of serious downsides.

@dshemetov
Copy link
Contributor

dshemetov commented Aug 27, 2022

I'll also throw out that I'm pretty partial to black.

The biggest selling point for me is the time-saving: often the solution to pylint's complaints are deterministic (delete trailing white spaces, break long lines, etc.) and black can just do that automatically.

To be fair, sometimes it really struggles and removes clearly human-readable formatting. But I think most of those can be mitigated by a judicious use of the fmt flag or by refactoring long call chains to variables.

@melange396
Copy link
Collaborator

for posterity, the above-referenced mention is here: #1041 (comment)

@dshemetov
Copy link
Contributor

dshemetov commented Jun 26, 2023

Formatting work

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

Successfully merging a pull request may close this issue.

3 participants