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

Configure linters and fix issues detected #5

Merged
merged 5 commits into from
Jul 4, 2023
Merged

Conversation

diazona
Copy link
Owner

@diazona diazona commented Jul 4, 2023

In this PR I've added or updated configuration for all the static linters (black, mypy, ruff) and fixed any errors detected (at least on Python 3.10 which is the only one I'm currently able to run... working on that).

This will pave the way to adding pre-commit hooks to run those linters, but I decided to leave that for a separate PR.

diazona added 5 commits July 3, 2023 16:35
This commit sets the line length to 120 and adds some files to exclude
from processing. The exclusions are pretty standard.
This commit adds configuration options to turn off detection of
namespace packages, since we're not using them, and to explicitly
specify the src/ directory as the package root.
In this commit I'm adding a configuration section for ruff that sets
the line length to 120 (same as was done for black), lists the src
directory as the package root relative to which imports should be
resolved, and sets Python 3.6 as the minimum target version.

I chose to put the configuration in pyproject.toml instead of a separate
file because it keeps the two line-length settings (for ruff and black)
close together and hopefully makes it harder to desynchronize them if we
change the line length later.
This ensures that black will run successfully on the existing files.
This gets all the tests invoked by tox to pass.
@diazona diazona added this to the Initial release milestone Jul 4, 2023
@diazona diazona requested a review from sjlongland July 4, 2023 00:14
@diazona diazona self-assigned this Jul 4, 2023
@sjlongland sjlongland merged commit 71c20d7 into main Jul 4, 2023
@sjlongland sjlongland deleted the linter-setup/1/dev branch July 4, 2023 08:47
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

Successfully merging this pull request may close these issues.

2 participants