adafruit / Adafruit_CircuitPython_datetime

Basic date and time types. Implements a subset of the CPython datetime module.
MIT License
4 stars 9 forks source link

pre-commit lint checks failing on tests/ #9

Closed jepler closed 3 years ago

jepler commented 3 years ago

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 commented 3 years ago

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

jepler commented 3 years ago

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

jepler commented 3 years ago

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  git@github.com: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 commented 3 years ago

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.

evaherrada commented 3 years ago

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