Skip to content

pre-commit lint checks failing on tests/ #9

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

Closed
jepler opened this issue Mar 22, 2021 · 5 comments
Closed

pre-commit lint checks failing on tests/ #9

jepler opened this issue Mar 22, 2021 · 5 comments
Assignees

Comments

@jepler
Copy link
Contributor

jepler commented Mar 22, 2021

Diagnostics include:

tests/test_time.py:106:24: C0113: Consider changing "not t1 != t2" to "t1 == t2" (unneeded-not)
tests/test_datetime.py:315:20: W0222: Signature differs from overridden 'replace' method (signature-differs)
tests/test_datetime.py:906:8: W0223: Method 'tzname' is abstract in class 'tzinfo' but is not overridden (abstract-method)

Since we took these tests from standard Python and don't "maintain" them as such, I'd favor adding disables when linting tests/, but instead of just acting I filed this since I know there are ongoing activities around fixing linting in tests/. Please feel free to deassign or assign me if this is outside of the scope of that.

This does seem to prevent #8 from being merged so it would be nice to resolve this.

@evaherrada
Copy link
Collaborator

Do you think you could try merging master into your branch? I'm pretty sure those were fixed in #7

@jepler
Copy link
Contributor Author

jepler commented Mar 22, 2021

I'm double checking for problems on my end ...

@jepler
Copy link
Contributor Author

jepler commented Mar 22, 2021

I see that CI for the master branch succeeded on github, but it still fails for me in pre-commit.

jepler@babs:~/src/datetime$ git remote -v
origin	https://github.com/adafruit/Adafruit_CircuitPython_datetime/ (fetch)
origin	[email protected]:adafruit/Adafruit_CircuitPython_datetime.git (push)
jepler@babs:~/src/datetime$ git fetch origin
jepler@babs:~/src/datetime$ git checkout origin/master 
HEAD is now at c848678 "Increase duplicate code check threshold "
jepler@babs:~/src/datetime$ git describe --tags
1.1.2-1-gc848678
jepler@babs:~/src/datetime$ pre-commit run --all
black....................................................................Passed
reuse....................................................................Passed
Check Yaml...............................................................Passed
Fix End of Files.........................................................Passed
Trim Trailing Whitespace.................................................Passed
pylint (library code)....................................................Passed
pylint (examples code)...................................................Passed
pylint (tests code)......................................................Failed
- hook id: pylint_tests
- exit code: 20

************* Module test_time
tests/test_time.py:106:24: C0113: Consider changing "not t1 != t2" to "t1 == t2" (unneeded-not)
tests/test_time.py:107:24: C0113: Consider changing "not t1 < t2" to "t1 >= t2" (unneeded-not)
…

@jepler
Copy link
Contributor Author

jepler commented Mar 22, 2021

OK this is weird, but ... I had to remove an older copy of adafruit_datetime installed via pip and then these messages went away for me locally.

I agree that on github the diagnostics probably occurred due to being based off an old ref.

Sorry for the trouble.

@jepler jepler closed this as completed Mar 22, 2021
@evaherrada
Copy link
Collaborator

Huh. odd. Glad you were able to get it fixed

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

2 participants