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

chore: initial nox and pylint support #1262

Merged
merged 1 commit into from
Jan 31, 2022

Conversation

henryiii
Copy link
Member

This adds an initial noxfile. No "fly by" contributor docs for it yet, that
will probably come a bit later, after we get editable installs working.

This adds configuration and a nox job for PyLint. I've avoided touching the
code, and instead added suppression with a "TODO" on anything I think we should
work on fixing. I think we could make PRs once in a while removing some of
these suppressions. (Otherwise this becomes too many changes at once). Some are
minor stylistic improvements, sometimes related to Python 3, some are
simplifications, and some are highly bug-prone that probably should be checked
sooner rather than later (marked with investigate!).

The syntax for disabling inline is # pylint: disable=<name>, or
disable-next to put it on the line before, or it can be at the top of a file.
This serves as nice documentation for a user to explain you know you are doing
something a bit naughty.

PyLint also has a bunch of over-the-top checks like too-many-* that I'd
expect we would always leave off. This is intentional - it's easier to see and
turn off a check vs. find it and turn it on. I think many of them are in the
"design" group, but I can't see how to tell what is in a group, I only know how
to list all groups (pylint --list-groups).

"consider-using-in", # TODO
"consider-using-max-builtin", # TODO
"consider-using-min-builtin", # TODO
"duplicate-code", # Hahahaha
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm...

@codecov
Copy link

codecov bot commented Jan 28, 2022

Codecov Report

Merging #1262 (e907155) into main (ab65e20) will increase coverage by 0.24%.
The diff coverage is 60.78%.

Impacted Files Coverage Δ
src/awkward/_v2/__init__.py 100.00% <ø> (ø)
src/awkward/_v2/_connect/numpy.py 58.63% <0.00%> (+0.17%) ⬆️
src/awkward/_v2/behaviors/string.py 71.42% <ø> (+16.88%) ⬆️
src/awkward/_v2/contents/__init__.py 100.00% <ø> (ø)
src/awkward/_v2/contents/emptyarray.py 69.36% <0.00%> (-0.18%) ⬇️
src/awkward/_v2/contents/indexedarray.py 60.64% <0.00%> (-0.10%) ⬇️
src/awkward/_v2/contents/indexedoptionarray.py 85.40% <0.00%> (+0.15%) ⬆️
src/awkward/_v2/contents/listarray.py 87.95% <0.00%> (+0.21%) ⬆️
src/awkward/_v2/contents/listoffsetarray.py 79.68% <0.00%> (+0.12%) ⬆️
src/awkward/_v2/contents/regulararray.py 82.85% <0.00%> (+0.18%) ⬆️
... and 146 more

@henryiii henryiii force-pushed the henryiii/chore/pylint0 branch from 7e869c9 to e907155 Compare January 29, 2022 19:40
Copy link
Member

@jpivarski jpivarski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve of this; feel free to merge it when you're done with it.

@henryiii henryiii merged commit 8e68200 into scikit-hep:main Jan 31, 2022
@henryiii henryiii deleted the henryiii/chore/pylint0 branch January 31, 2022 21:07
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