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

Fix pylint errors #21

Closed tekktrik closed 1 year ago

tekktrik commented 1 year ago

Fixes the following pylint errors:

Error: pylint (library code)....................................................Failed
- hook id: pylint
- exit code: 4

************* Module adafruit_datetime
Error: adafruit_datetime.py:631:0: W1404: Implicit string concatenation found in call (implicit-str-concat)
Error: adafruit_datetime.py:844:0: W1404: Implicit string concatenation found in call (implicit-str-concat)
Error: adafruit_datetime.py:863:0: W1404: Implicit string concatenation found in call (implicit-str-concat)
Error: adafruit_datetime.py:870:0: W1404: Implicit string concatenation found in call (implicit-str-concat)
Error: adafruit_datetime.py:1367:4: W0237: Parameter 't' has been renamed to 'timestamp' in overridden 'datetime.fromtimestamp' method (arguments-renamed)

-----------------------------------
Your code has been rated at 9.95/10

pylint (example code)....................................................Passed
Error: pylint (test code).......................................................Failed
- hook id: pylint
- exit code: 20

************* Module test_date
Error: tests/test_date.py:12:0: W0012: Unknown option value for 'disable', expected a valid pylint message and got 'misplaced-comparison-constant' (unknown-option-value)
Error: tests/test_date.py:228:25: C2801: Unnecessarily calls dunder method __format__. Use format built-in function, format string method, or f-string. (unnecessary-dunder-call)
Error: tests/test_date.py:236:25: C2801: Unnecessarily calls dunder method __format__. Use format built-in function, format string method, or f-string. (unnecessary-dunder-call)
Error: tests/test_date.py:244:25: C2801: Unnecessarily calls dunder method __format__. Use format built-in function, format string method, or f-string. (unnecessary-dunder-call)
************* Module test_datetime
Error: tests/test_datetime.py:242:25: C2801: Unnecessarily calls dunder method __format__. Use format built-in function, format string method, or f-string. (unnecessary-dunder-call)
Error: tests/test_datetime.py:245:12: C2801: Unnecessarily calls dunder method __format__. Use format built-in function, format string method, or f-string. (unnecessary-dunder-call)
Error: tests/test_datetime.py:253:25: C2801: Unnecessarily calls dunder method __format__. Use format built-in function, format string method, or f-string. (unnecessary-dunder-call)
Error: tests/test_datetime.py:261:25: C2801: Unnecessarily calls dunder method __format__. Use format built-in function, format string method, or f-string. (unnecessary-dunder-call)
Error: tests/test_datetime.py:268:29: C2801: Unnecessarily calls dunder method __format__. Use format built-in function, format string method, or f-string. (unnecessary-dunder-call)
Error: tests/test_datetime.py:269:29: C2801: Unnecessarily calls dunder method __format__. Use format built-in function, format string method, or f-string. (unnecessary-dunder-call)
Error: tests/test_datetime.py:270:29: C2801: Unnecessarily calls dunder method __format__. Use format built-in function, format string method, or f-string. (unnecessary-dunder-call)
************* Module test_time
Error: tests/test_time.py:240:25: C2801: Unnecessarily calls dunder method __format__. Use format built-in function, format string method, or f-string. (unnecessary-dunder-call)
Error: tests/test_time.py:243:12: C2801: Unnecessarily calls dunder method __format__. Use format built-in function, format string method, or f-string. (unnecessary-dunder-call)
Error: tests/test_time.py:251:25: C2801: Unnecessarily calls dunder method __format__. Use format built-in function, format string method, or f-string. (unnecessary-dunder-call)
Error: tests/test_time.py:259:25: C2801: Unnecessarily calls dunder method __format__. Use format built-in function, format string method, or f-string. (unnecessary-dunder-call)
Error: tests/test_time.py:264:29: C2801: Unnecessarily calls dunder method __format__. Use format built-in function, format string method, or f-string. (unnecessary-dunder-call)
Error: tests/test_time.py:265:29: C2801: Unnecessarily calls dunder method __format__. Use format built-in function, format string method, or f-string. (unnecessary-dunder-call)
Error: tests/test_time.py:266:29: C2801: Unnecessarily calls dunder method __format__. Use format built-in function, format string method, or f-string. (unnecessary-dunder-call)

-----------------------------------
Your code has been rated at 9.86/10