Commit Graph

7 Commits (master)

Author SHA1 Message Date
Ewout ter Hoeven 332f568a82
Pyupgrade 3.6: Update syntax with Python 3.6+ features (#23305)
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>
2021-12-24 11:18:39 -08:00
Ewout ter Hoeven 55390d273f
Convert format strings strings to f-strings (#23241)
* 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>
2021-12-16 14:58:17 +01:00
Jason Young 182b00896c
Update CI tests for CAN fingerprinting deprecation (#21043)
* Start refactor of CI tests for FPv1 deprecation

* Fix test_car_interfaces

* Touch up comment

* Smaller diff
2021-05-26 14:02:42 -07:00
Adeeb Shihadeh e5575a6a4c
Remove ignored CAN fingerprints (#20994)
* VW is all FW

* fix test

* toyota

* honda

* hyundai

* remove IGNORED_FINGERPRINTS

* toyota
2021-05-24 13:50:10 -07:00
Willem Melching 1162041ea6
Only send FW query requests for the right brand (#1546)
* only send requests for the right brand

* this works on sonata

Co-authored-by: openpilot laptop <laptop@comma.ai>
2020-05-20 13:02:24 -07:00
Willem Melching 9e6e1cba56
Fingerprint rav4 hybrid tss2 only using firmware versions (#1084)
* fingerprint rav4 hybrid tsss only using firmware

* remove print statement
2020-02-12 12:59:38 -08:00
George Hotz 71ead9adea selfdrive/car 2020-01-17 10:58:43 -08:00