Updated Python code with Python 3.6+ features:
- utf-8 encoding is now the default (PEP 3120)
- Replace list comprehensions by Generator Expressions (PEP 289)
- Replace yield loop by yield from (PEP 380)
- Remove the (object) subclass when defining a class
- Replace the IOError alias by OSError (PEP 3151)
- Define sets with curly braces {} instead of set()
- Remove "r" parameter from open function, which is default
Co-Authored-By: Adeeb Shihadeh <8762862+adeebshihadeh@users.noreply.github.com>
Co-Authored-By: GregorKikelj <96022003+GregorKikelj@users.noreply.github.com>
Co-authored-by: Adeeb Shihadeh <8762862+adeebshihadeh@users.noreply.github.com>
Co-authored-by: GregorKikelj <96022003+GregorKikelj@users.noreply.github.com>
old-commit-hash: 332f568a82
* Convert all text strings to f-strings
Reformats all the text from the old "%-formatted" and .format(...) format to the newer f-string format, as defined in PEP 498. This requires Python 3.6+.
Flynt 0.69 was used to reformat the strings. 120 f-strings were created in 51 files.
F-strings are in general more readable, concise and performant. See also: https://www.python.org/dev/peps/pep-0498/#rationale
* revert pyextra changes
* revert ublox.py
Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 55390d273f
* Less open file permissions
* add test back
* remove params test for permissions
* remove umask
* bump cereal
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
old-commit-hash: dddab597bc
* framework for updates
* File caching
* update .gitignore
* update .gitignore
* Store in home tmp directory
* fix bugs in old code, add tests
* add test
* revert bug
* Fixed some bugs, more testing
* doing some style fixes
* Update caching with lenghts
* doing some style fixes
* doing some style fixes
* doing some style fixes
* subrepositories
* try to fix the tests
* change submodules back
* doing some style fixes
* if we don't cache, we don't cache length either
* fix curls
* make sure tests run in ci
* Cleanup tests
* Use int for cache flag
* fix linter
Co-authored-by: Willem Melching <willem.melching@gmail.com>
old-commit-hash: 05b64257df
* add parallel download support to URLFile
* make python 3.8 happy
* Fix chunk size
* Automatic number of threads
* No daemon threads in unlogger
* Cache length
* dont touch old filereader
* Remove debug info
* remove debug script
* Ignore type
old-commit-hash: c70700758d
* "The commit-hook project sounds interesting though. I would definitely merge something that runs flake8 and pylint on the modified files!"
- pd0wm, https://github.com/commaai/openpilot/pull/1575#issuecomment-634974344
* add pylint to pre-commit and make everything pass
* Remove uncommented stuff
Co-authored-by: J <user@4800.lan>
old-commit-hash: bd06434243
* lgtm in readme, and mac nui fixes
* call super inits in radars
* unused imports, dup lines
* more radars, more unused imports
* pass CP into RadarInterfaceBase
* more fixups
* unused imports
* delete unused lines
* ugh, new unused import
Co-authored-by: George Hotz <geohot@gmail.com>
old-commit-hash: 1295cfe06c