LupoA / lsdensities

Smeared spectral densities from lattice correlators
GNU General Public License v3.0
3 stars 0 forks source link

Use a code style checker #31

Closed edbennett closed 5 months ago

edbennett commented 6 months ago

In addition to autoformatting (see #25), ruff can also check for more increasingly pedantic things that it can't automatically fix. I wouldn't suggest enabling everything, but would suggest we discuss what categories of warning are a good starting point.

For example, I would definitely want to try and get rid of any lines including import *, and more broadly any imports that aren't used.

nickforce989 commented 5 months ago

Done. I don't get any error anymore when ruff check is ran.

edbennett commented 5 months ago

One more thing, sorry: can you please add the configuration block for this to pyproject.toml? This will provide a starting point for further tidying later.

nickforce989 commented 5 months ago

May I ask what should I add?

edbennett commented 5 months ago

Oops, I was planning to include that in the previous message, but got side-tracked, rewrote the message, and forgot it.

The tool.ruff.lint block from the ruff README