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

Multiple linters #20

Open
jmccartin opened this issue Nov 29, 2022 · 1 comment
Open

Multiple linters #20

jmccartin opened this issue Nov 29, 2022 · 1 comment

Comments

@jmccartin
Copy link
Collaborator

jmccartin commented Nov 29, 2022

Seems like there are multiple Github workflow files which check the code for various formatting (flake8, pylint, and black). Since black is the most strict, why not just run that one? Consolidating would simplify contribution guidelines, save on build minutes, especially if using free actions and scope of tests increases in future.

There are also some conflicts in each of the settings files (.flake8, pyproject.toml) regarding line length and ignored exceptions. Moving completely to black will probably fix these, as it's generally without configuration.

msuriar added a commit to msuriar/missile-tid that referenced this issue Dec 26, 2022
As per tylerni7#20. This removes all references to `pylint` in favour of relying
on whatever opinionated standards which `black` has gone with.

- Remove Github Actions Workflow
- Remove pylint section in `pyproject.toml`
- Update README section on contributing to be more generic. ("Make sure
  all configured github actions pass" rather than naming specific
  checks).

I haven't touched `flake8` for now, since in theory it catches a bunch of
stuff which `black` doesn't care about, but which generally keeps
codebases clean (e.g. checking for unused variables, imports etc). My
instinct is to leave flake8 in place, unless people very strongly feel
otherwise.
@jmccartin
Copy link
Collaborator Author

Seems like flake8 is pyproject.toml ignorant - one of the few Python linters that remains that way for some reason. The imports in the code currently go against PEP8 recommendations, which flake8 will only pick up on with optional extras, like flake8-import-order.

I think most of the functionality there can be done with black and isort instead. The latter does better sorting of imports (with optional checks for CI tooling), so we can probably do away with flake8 all-together.

msuriar added a commit to msuriar/missile-tid that referenced this issue Dec 28, 2022
As per tylerni7#20. This removes all references to `pylint` in favour of relying
on whatever opinionated standards which `black` has gone with.

- Remove Github Actions Workflow
- Remove pylint section in pyproject.toml
- Update README section on contributing to be more generic. ("Make
  sure all configured github actions pass" rather than naming specific
  checks).

I haven't touched `flake8` for now, since in theory it catches a bunch
of stuff which black doesn't care about, but which generally keeps
codebases clean (e.g. checking for unused variables, imports etc). My
instinct is to leave flake8 in place, unless people very strongly feel
otherwise.
tylerni7 pushed a commit that referenced this issue Dec 28, 2022
As per #20. This removes all references to `pylint` in favour of relying
on whatever opinionated standards which `black` has gone with.

- Remove Github Actions Workflow
- Remove pylint section in pyproject.toml
- Update README section on contributing to be more generic. ("Make
  sure all configured github actions pass" rather than naming specific
  checks).

I haven't touched `flake8` for now, since in theory it catches a bunch
of stuff which black doesn't care about, but which generally keeps
codebases clean (e.g. checking for unused variables, imports etc). My
instinct is to leave flake8 in place, unless people very strongly feel
otherwise.
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

1 participant