-
Notifications
You must be signed in to change notification settings - Fork 10.5k
speed up pytest collection #36938
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
base: master
Are you sure you want to change the base?
speed up pytest collection #36938
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,11 +1,109 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import contextlib | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import gc | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import os | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| # Pre-warm heavy imports before pytest collection | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| try: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import numpy # noqa: F401 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| except ImportError: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pass | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| try: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import hypothesis # noqa: F401 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| except ImportError: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| pass | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| try: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import cereal | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| import cereal | |
| import cereal # noqa: F401 |
Copilot
AI
Dec 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Module 'cereal' is imported with both 'import' and 'import from'.
| import cereal | |
| except ImportError: | |
| pass | |
| try: |
Copilot
AI
Dec 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import of 'car' is not used.
| from opendbc import car # noqa: F401 | |
| from opendbc import car # noqa: F401 | |
| _ = car |
Copilot
AI
Dec 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import of 'LogReader' is not used.
Copilot
AI
Dec 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import of 'casadi' is not used.
Copilot
AI
Dec 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import of 'Params' is not used.
Copilot
AI
Dec 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import of 'helpers' is not used.
| from openpilot.selfdrive.test import helpers # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: |
Copilot
AI
Dec 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import of 'parameterized' is not used.
| import parameterized # noqa: F401 | |
| import parameterized # noqa: F401 | |
| _ = parameterized |
Copilot
AI
Dec 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'except' clause does nothing but pass and there is no explanatory comment.
| except ImportError: | |
| pass | |
| try: | |
| import hypothesis # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import cereal | |
| except ImportError: | |
| pass | |
| try: | |
| from opendbc import car # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.tools.lib.logreader import LogReader # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import casadi # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.common.params import Params # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.selfdrive.test import helpers # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import parameterized # noqa: F401 | |
| except ImportError: | |
| except ImportError: | |
| # Optional dependency; ignore if not installed and let tests handle absence. | |
| pass | |
| try: | |
| import hypothesis # noqa: F401 | |
| except ImportError: | |
| # Optional dependency; ignore if not installed and let tests handle absence. | |
| pass | |
| try: | |
| import cereal | |
| except ImportError: | |
| # Optional dependency; ignore if not installed and let tests handle absence. | |
| pass | |
| try: | |
| from opendbc import car # noqa: F401 | |
| except ImportError: | |
| # Optional dependency; ignore if not installed and let tests handle absence. | |
| pass | |
| try: | |
| from openpilot.tools.lib.logreader import LogReader # noqa: F401 | |
| except ImportError: | |
| # Optional dependency; ignore if not installed and let tests handle absence. | |
| pass | |
| try: | |
| import casadi # noqa: F401 | |
| except ImportError: | |
| # Optional dependency; ignore if not installed and let tests handle absence. | |
| pass | |
| try: | |
| from openpilot.common.params import Params # noqa: F401 | |
| except ImportError: | |
| # Optional dependency; ignore if not installed and let tests handle absence. | |
| pass | |
| try: | |
| from openpilot.selfdrive.test import helpers # noqa: F401 | |
| except ImportError: | |
| # Optional dependency; ignore if not installed and let tests handle absence. | |
| pass | |
| try: | |
| import parameterized # noqa: F401 | |
| except ImportError: | |
| # Optional dependency; ignore if not installed and let tests handle absence. |
Copilot
AI
Dec 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import of 'cereal' is not used.
Copilot
AI
Dec 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'except' clause does nothing but pass and there is no explanatory comment.
| except ImportError: | |
| pass | |
| try: | |
| import hypothesis # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import cereal | |
| except ImportError: | |
| pass | |
| try: | |
| from opendbc import car # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.tools.lib.logreader import LogReader # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import casadi # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.common.params import Params # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.selfdrive.test import helpers # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import parameterized # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import cereal.messaging # noqa: F401 | |
| except ImportError: | |
| except ImportError: | |
| # Optional dependency for test pre-warming; safe to ignore if not installed. | |
| pass | |
| try: | |
| import hypothesis # noqa: F401 | |
| except ImportError: | |
| # Optional dependency for test pre-warming; safe to ignore if not installed. | |
| pass | |
| try: | |
| import cereal | |
| except ImportError: | |
| # Optional dependency for test pre-warming; safe to ignore if not installed. | |
| pass | |
| try: | |
| from opendbc import car # noqa: F401 | |
| except ImportError: | |
| # Optional dependency for test pre-warming; safe to ignore if not installed. | |
| pass | |
| try: | |
| from openpilot.tools.lib.logreader import LogReader # noqa: F401 | |
| except ImportError: | |
| # Optional dependency for test pre-warming; safe to ignore if not installed. | |
| pass | |
| try: | |
| import casadi # noqa: F401 | |
| except ImportError: | |
| # Optional dependency for test pre-warming; safe to ignore if not installed. | |
| pass | |
| try: | |
| from openpilot.common.params import Params # noqa: F401 | |
| except ImportError: | |
| # Optional dependency for test pre-warming; safe to ignore if not installed. | |
| pass | |
| try: | |
| from openpilot.selfdrive.test import helpers # noqa: F401 | |
| except ImportError: | |
| # Optional dependency for test pre-warming; safe to ignore if not installed. | |
| pass | |
| try: | |
| import parameterized # noqa: F401 | |
| except ImportError: | |
| # Optional dependency for test pre-warming; safe to ignore if not installed. | |
| pass | |
| try: | |
| import cereal.messaging # noqa: F401 | |
| except ImportError: | |
| # Optional dependency for test pre-warming; safe to ignore if not installed. |
Copilot
AI
Dec 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'except' clause does nothing but pass and there is no explanatory comment.
| except ImportError: | |
| pass | |
| try: | |
| import hypothesis # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import cereal | |
| except ImportError: | |
| pass | |
| try: | |
| from opendbc import car # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.tools.lib.logreader import LogReader # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import casadi # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.common.params import Params # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.selfdrive.test import helpers # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import parameterized # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import cereal.messaging # noqa: F401 | |
| except ImportError: | |
| except ImportError: | |
| # Optional dependency: tests can run without pre-warming this import. | |
| pass | |
| try: | |
| import hypothesis # noqa: F401 | |
| except ImportError: | |
| # Optional dependency: tests can run without pre-warming this import. | |
| pass | |
| try: | |
| import cereal | |
| except ImportError: | |
| # Optional dependency: tests can run without pre-warming this import. | |
| pass | |
| try: | |
| from opendbc import car # noqa: F401 | |
| except ImportError: | |
| # Optional dependency: tests can run without pre-warming this import. | |
| pass | |
| try: | |
| from openpilot.tools.lib.logreader import LogReader # noqa: F401 | |
| except ImportError: | |
| # Optional dependency: tests can run without pre-warming this import. | |
| pass | |
| try: | |
| import casadi # noqa: F401 | |
| except ImportError: | |
| # Optional dependency: tests can run without pre-warming this import. | |
| pass | |
| try: | |
| from openpilot.common.params import Params # noqa: F401 | |
| except ImportError: | |
| # Optional dependency: tests can run without pre-warming this import. | |
| pass | |
| try: | |
| from openpilot.selfdrive.test import helpers # noqa: F401 | |
| except ImportError: | |
| # Optional dependency: tests can run without pre-warming this import. | |
| pass | |
| try: | |
| import parameterized # noqa: F401 | |
| except ImportError: | |
| # Optional dependency: tests can run without pre-warming this import. | |
| pass | |
| try: | |
| import cereal.messaging # noqa: F401 | |
| except ImportError: | |
| # Optional dependency: tests can run without pre-warming this import. |
Copilot
AI
Dec 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'except' clause does nothing but pass and there is no explanatory comment.
| try: | |
| import numpy # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import hypothesis # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import cereal | |
| except ImportError: | |
| pass | |
| try: | |
| from opendbc import car # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.tools.lib.logreader import LogReader # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import casadi # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.common.params import Params # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.selfdrive.test import helpers # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import parameterized # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import cereal.messaging # noqa: F401 | |
| except ImportError: | |
| pass | |
| with contextlib.suppress(ImportError): | |
| import numpy # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| import hypothesis # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| import cereal | |
| with contextlib.suppress(ImportError): | |
| from opendbc import car # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| from openpilot.tools.lib.logreader import LogReader # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| import casadi # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| from openpilot.common.params import Params # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| from openpilot.selfdrive.test import helpers # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| import parameterized # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| import cereal.messaging # noqa: F401 |
Copilot
AI
Dec 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'except' clause does nothing but pass and there is no explanatory comment.
| except ImportError: | |
| pass | |
| try: | |
| import hypothesis # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import cereal | |
| except ImportError: | |
| pass | |
| try: | |
| from opendbc import car # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.tools.lib.logreader import LogReader # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import casadi # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.common.params import Params # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.selfdrive.test import helpers # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import parameterized # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import cereal.messaging # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from cereal import log # noqa: F401 | |
| except ImportError: | |
| except ImportError: # Optional dependency for tests; ignore if not installed | |
| pass | |
| try: | |
| import hypothesis # noqa: F401 | |
| except ImportError: # Optional dependency for tests; ignore if not installed | |
| pass | |
| try: | |
| import cereal | |
| except ImportError: # Optional dependency for tests; ignore if not installed | |
| pass | |
| try: | |
| from opendbc import car # noqa: F401 | |
| except ImportError: # Optional dependency for tests; ignore if not installed | |
| pass | |
| try: | |
| from openpilot.tools.lib.logreader import LogReader # noqa: F401 | |
| except ImportError: # Optional dependency for tests; ignore if not installed | |
| pass | |
| try: | |
| import casadi # noqa: F401 | |
| except ImportError: # Optional dependency for tests; ignore if not installed | |
| pass | |
| try: | |
| from openpilot.common.params import Params # noqa: F401 | |
| except ImportError: # Optional dependency for tests; ignore if not installed | |
| pass | |
| try: | |
| from openpilot.selfdrive.test import helpers # noqa: F401 | |
| except ImportError: # Optional dependency for tests; ignore if not installed | |
| pass | |
| try: | |
| import parameterized # noqa: F401 | |
| except ImportError: # Optional dependency for tests; ignore if not installed | |
| pass | |
| try: | |
| import cereal.messaging # noqa: F401 | |
| except ImportError: # Optional dependency for tests; ignore if not installed | |
| pass | |
| try: | |
| from cereal import log # noqa: F401 | |
| except ImportError: # Optional dependency for tests; ignore if not installed |
Copilot
AI
Dec 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'except' clause does nothing but pass and there is no explanatory comment.
| except ImportError: | |
| pass | |
| try: | |
| import hypothesis # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import cereal | |
| except ImportError: | |
| pass | |
| try: | |
| from opendbc import car # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.tools.lib.logreader import LogReader # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import casadi # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.common.params import Params # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.selfdrive.test import helpers # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import parameterized # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import cereal.messaging # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from cereal import log # noqa: F401 | |
| except ImportError: | |
| except ImportError: | |
| # Optional dependency: tests requiring this will be skipped if the import is unavailable. | |
| pass | |
| try: | |
| import hypothesis # noqa: F401 | |
| except ImportError: | |
| # Optional dependency: tests requiring this will be skipped if the import is unavailable. | |
| pass | |
| try: | |
| import cereal | |
| except ImportError: | |
| # Optional dependency: tests requiring this will be skipped if the import is unavailable. | |
| pass | |
| try: | |
| from opendbc import car # noqa: F401 | |
| except ImportError: | |
| # Optional dependency: tests requiring this will be skipped if the import is unavailable. | |
| pass | |
| try: | |
| from openpilot.tools.lib.logreader import LogReader # noqa: F401 | |
| except ImportError: | |
| # Optional dependency: tests requiring this will be skipped if the import is unavailable. | |
| pass | |
| try: | |
| import casadi # noqa: F401 | |
| except ImportError: | |
| # Optional dependency: tests requiring this will be skipped if the import is unavailable. | |
| pass | |
| try: | |
| from openpilot.common.params import Params # noqa: F401 | |
| except ImportError: | |
| # Optional dependency: tests requiring this will be skipped if the import is unavailable. | |
| pass | |
| try: | |
| from openpilot.selfdrive.test import helpers # noqa: F401 | |
| except ImportError: | |
| # Optional dependency: tests requiring this will be skipped if the import is unavailable. | |
| pass | |
| try: | |
| import parameterized # noqa: F401 | |
| except ImportError: | |
| # Optional dependency: tests requiring this will be skipped if the import is unavailable. | |
| pass | |
| try: | |
| import cereal.messaging # noqa: F401 | |
| except ImportError: | |
| # Optional dependency: tests requiring this will be skipped if the import is unavailable. | |
| pass | |
| try: | |
| from cereal import log # noqa: F401 | |
| except ImportError: | |
| # Optional dependency: tests requiring this will be skipped if the import is unavailable. |
Copilot
AI
Dec 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'except' clause does nothing but pass and there is no explanatory comment.
| try: | |
| import numpy # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import hypothesis # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import cereal | |
| except ImportError: | |
| pass | |
| try: | |
| from opendbc import car # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.tools.lib.logreader import LogReader # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import casadi # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.common.params import Params # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.selfdrive.test import helpers # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import parameterized # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import cereal.messaging # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from cereal import log # noqa: F401 | |
| except ImportError: | |
| pass | |
| with contextlib.suppress(ImportError): | |
| import numpy # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| import hypothesis # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| import cereal | |
| with contextlib.suppress(ImportError): | |
| from opendbc import car # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| from openpilot.tools.lib.logreader import LogReader # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| import casadi # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| from openpilot.common.params import Params # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| from openpilot.selfdrive.test import helpers # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| import parameterized # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| import cereal.messaging # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| from cereal import log # noqa: F401 |
Copilot
AI
Dec 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'except' clause does nothing but pass and there is no explanatory comment.
| except ImportError: | |
| pass | |
| try: | |
| import hypothesis # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import cereal | |
| except ImportError: | |
| pass | |
| try: | |
| from opendbc import car # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.tools.lib.logreader import LogReader # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import casadi # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.common.params import Params # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.selfdrive.test import helpers # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import parameterized # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import cereal.messaging # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from cereal import log # noqa: F401 | |
| except ImportError: | |
| pass | |
| except ImportError: | |
| # Optional dependency; safe to skip if not installed during test collection. | |
| pass | |
| try: | |
| import hypothesis # noqa: F401 | |
| except ImportError: | |
| # Optional dependency; safe to skip if not installed during test collection. | |
| pass | |
| try: | |
| import cereal | |
| except ImportError: | |
| # Optional dependency; safe to skip if not installed during test collection. | |
| pass | |
| try: | |
| from opendbc import car # noqa: F401 | |
| except ImportError: | |
| # Optional dependency; safe to skip if not installed during test collection. | |
| pass | |
| try: | |
| from openpilot.tools.lib.logreader import LogReader # noqa: F401 | |
| except ImportError: | |
| # Optional dependency; safe to skip if not installed during test collection. | |
| pass | |
| try: | |
| import casadi # noqa: F401 | |
| except ImportError: | |
| # Optional dependency; safe to skip if not installed during test collection. | |
| pass | |
| try: | |
| from openpilot.common.params import Params # noqa: F401 | |
| except ImportError: | |
| # Optional dependency; safe to skip if not installed during test collection. | |
| pass | |
| try: | |
| from openpilot.selfdrive.test import helpers # noqa: F401 | |
| except ImportError: | |
| # Optional dependency; safe to skip if not installed during test collection. | |
| pass | |
| try: | |
| import parameterized # noqa: F401 | |
| except ImportError: | |
| # Optional dependency; safe to skip if not installed during test collection. | |
| pass | |
| try: | |
| import cereal.messaging # noqa: F401 | |
| except ImportError: | |
| # Optional dependency; safe to skip if not installed during test collection. | |
| pass | |
| try: | |
| from cereal import log # noqa: F401 | |
| except ImportError: | |
| # Optional dependency; safe to skip if not installed during test collection. | |
| pass | |
| pass |
Copilot
AI
Dec 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'except' clause does nothing but pass and there is no explanatory comment.
| except ImportError: | |
| pass | |
| try: | |
| import hypothesis # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import cereal | |
| except ImportError: | |
| pass | |
| try: | |
| from opendbc import car # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.tools.lib.logreader import LogReader # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import casadi # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.common.params import Params # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.selfdrive.test import helpers # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import parameterized # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import cereal.messaging # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from cereal import log # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from panda import Panda # noqa: F401 | |
| except ImportError: | |
| except ImportError: | |
| # Optional dependency for tests; safe to ignore if not installed. | |
| pass | |
| try: | |
| import hypothesis # noqa: F401 | |
| except ImportError: | |
| # Optional dependency for tests; safe to ignore if not installed. | |
| pass | |
| try: | |
| import cereal | |
| except ImportError: | |
| # Optional dependency for tests; safe to ignore if not installed. | |
| pass | |
| try: | |
| from opendbc import car # noqa: F401 | |
| except ImportError: | |
| # Optional dependency for tests; safe to ignore if not installed. | |
| pass | |
| try: | |
| from openpilot.tools.lib.logreader import LogReader # noqa: F401 | |
| except ImportError: | |
| # Optional dependency for tests; safe to ignore if not installed. | |
| pass | |
| try: | |
| import casadi # noqa: F401 | |
| except ImportError: | |
| # Optional dependency for tests; safe to ignore if not installed. | |
| pass | |
| try: | |
| from openpilot.common.params import Params # noqa: F401 | |
| except ImportError: | |
| # Optional dependency for tests; safe to ignore if not installed. | |
| pass | |
| try: | |
| from openpilot.selfdrive.test import helpers # noqa: F401 | |
| except ImportError: | |
| # Optional dependency for tests; safe to ignore if not installed. | |
| pass | |
| try: | |
| import parameterized # noqa: F401 | |
| except ImportError: | |
| # Optional dependency for tests; safe to ignore if not installed. | |
| pass | |
| try: | |
| import cereal.messaging # noqa: F401 | |
| except ImportError: | |
| # Optional dependency for tests; safe to ignore if not installed. | |
| pass | |
| try: | |
| from cereal import log # noqa: F401 | |
| except ImportError: | |
| # Optional dependency for tests; safe to ignore if not installed. | |
| pass | |
| try: | |
| from panda import Panda # noqa: F401 | |
| except ImportError: | |
| # Optional dependency for tests; safe to ignore if not installed. |
Copilot
AI
Dec 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import of 'Panda' is not used.
| from panda import Panda # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: |
Copilot
AI
Dec 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import of 'managed_processes' is not used.
Copilot
AI
Dec 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'except' clause does nothing but pass and there is no explanatory comment.
| except ImportError: | |
| pass | |
| try: | |
| import hypothesis # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import cereal | |
| except ImportError: | |
| pass | |
| try: | |
| from opendbc import car # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.tools.lib.logreader import LogReader # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import casadi # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.common.params import Params # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.selfdrive.test import helpers # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import parameterized # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import cereal.messaging # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from cereal import log # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from panda import Panda # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.system.manager.process_config import managed_processes # noqa: F401 | |
| except ImportError: | |
| except ImportError: | |
| # Optional dependency; safe to skip pre-warming if numpy is not installed. | |
| pass | |
| try: | |
| import hypothesis # noqa: F401 | |
| except ImportError: | |
| # Optional dependency; safe to skip pre-warming if hypothesis is not installed. | |
| pass | |
| try: | |
| import cereal | |
| except ImportError: | |
| # Optional dependency; safe to skip pre-warming if cereal is not installed. | |
| pass | |
| try: | |
| from opendbc import car # noqa: F401 | |
| except ImportError: | |
| # Optional dependency; safe to skip pre-warming if opendbc is not installed. | |
| pass | |
| try: | |
| from openpilot.tools.lib.logreader import LogReader # noqa: F401 | |
| except ImportError: | |
| # Optional dependency; safe to skip pre-warming if openpilot tools are not installed. | |
| pass | |
| try: | |
| import casadi # noqa: F401 | |
| except ImportError: | |
| # Optional dependency; safe to skip pre-warming if casadi is not installed. | |
| pass | |
| try: | |
| from openpilot.common.params import Params # noqa: F401 | |
| except ImportError: | |
| # Optional dependency; safe to skip pre-warming if openpilot common is not installed. | |
| pass | |
| try: | |
| from openpilot.selfdrive.test import helpers # noqa: F401 | |
| except ImportError: | |
| # Optional dependency; safe to skip pre-warming if openpilot selfdrive tests are not installed. | |
| pass | |
| try: | |
| import parameterized # noqa: F401 | |
| except ImportError: | |
| # Optional dependency; safe to skip pre-warming if parameterized is not installed. | |
| pass | |
| try: | |
| import cereal.messaging # noqa: F401 | |
| except ImportError: | |
| # Optional dependency; safe to skip pre-warming if cereal.messaging is not installed. | |
| pass | |
| try: | |
| from cereal import log # noqa: F401 | |
| except ImportError: | |
| # Optional dependency; safe to skip pre-warming if cereal.log is not installed. | |
| pass | |
| try: | |
| from panda import Panda # noqa: F401 | |
| except ImportError: | |
| # Optional dependency; safe to skip pre-warming if panda is not installed. | |
| pass | |
| try: | |
| from openpilot.system.manager.process_config import managed_processes # noqa: F401 | |
| except ImportError: | |
| # Optional dependency; safe to skip pre-warming if openpilot system manager is not installed. |
Copilot
AI
Dec 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'except' clause does nothing but pass and there is no explanatory comment.
| except ImportError: | |
| pass | |
| try: | |
| import hypothesis # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import cereal | |
| except ImportError: | |
| pass | |
| try: | |
| from opendbc import car # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.tools.lib.logreader import LogReader # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import casadi # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.common.params import Params # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.selfdrive.test import helpers # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import parameterized # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import cereal.messaging # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from cereal import log # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from panda import Panda # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.system.manager.process_config import managed_processes # noqa: F401 | |
| except ImportError: | |
| except ImportError: | |
| # Optional dependency for speeding up tests; ignore if not installed. | |
| pass | |
| try: | |
| import hypothesis # noqa: F401 | |
| except ImportError: | |
| # Optional dependency for property-based tests; tests will be skipped or reduced if absent. | |
| pass | |
| try: | |
| import cereal | |
| except ImportError: | |
| # Optional dependency; some tests may be skipped or have reduced functionality if absent. | |
| pass | |
| try: | |
| from opendbc import car # noqa: F401 | |
| except ImportError: | |
| # Optional dependency; ignore if not installed in this environment. | |
| pass | |
| try: | |
| from openpilot.tools.lib.logreader import LogReader # noqa: F401 | |
| except ImportError: | |
| # Optional dependency used by certain tests; ignore if unavailable. | |
| pass | |
| try: | |
| import casadi # noqa: F401 | |
| except ImportError: | |
| # Optional optimization/solver dependency; tests handle its absence. | |
| pass | |
| try: | |
| from openpilot.common.params import Params # noqa: F401 | |
| except ImportError: | |
| # Optional openpilot dependency; ignore if project components are not installed. | |
| pass | |
| try: | |
| from openpilot.selfdrive.test import helpers # noqa: F401 | |
| except ImportError: | |
| # Optional openpilot test helpers; tests may be limited without this module. | |
| pass | |
| try: | |
| import parameterized # noqa: F401 | |
| except ImportError: | |
| # Optional test utility; parameterized tests may not run if missing. | |
| pass | |
| try: | |
| import cereal.messaging # noqa: F401 | |
| except ImportError: | |
| # Optional messaging dependency; ignore if not installed. | |
| pass | |
| try: | |
| from cereal import log # noqa: F401 | |
| except ImportError: | |
| # Optional logging schema dependency; tests adapt if unavailable. | |
| pass | |
| try: | |
| from panda import Panda # noqa: F401 | |
| except ImportError: | |
| # Optional hardware interface dependency; tests that need Panda will handle its absence. | |
| pass | |
| try: | |
| from openpilot.system.manager.process_config import managed_processes # noqa: F401 | |
| except ImportError: | |
| # Optional openpilot process configuration; ignore if openpilot is not installed. |
Copilot
AI
Dec 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'except' clause does nothing but pass and there is no explanatory comment.
| try: | |
| import numpy # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import hypothesis # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import cereal | |
| except ImportError: | |
| pass | |
| try: | |
| from opendbc import car # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.tools.lib.logreader import LogReader # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import casadi # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.common.params import Params # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.selfdrive.test import helpers # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import parameterized # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import cereal.messaging # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from cereal import log # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from panda import Panda # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.system.manager.process_config import managed_processes # noqa: F401 | |
| except ImportError: | |
| pass | |
| with contextlib.suppress(ImportError): | |
| import numpy # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| import hypothesis # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| import cereal | |
| with contextlib.suppress(ImportError): | |
| from opendbc import car # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| from openpilot.tools.lib.logreader import LogReader # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| import casadi # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| from openpilot.common.params import Params # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| from openpilot.selfdrive.test import helpers # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| import parameterized # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| import cereal.messaging # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| from cereal import log # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| from panda import Panda # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| from openpilot.system.manager.process_config import managed_processes # noqa: F401 |
Copilot
AI
Dec 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'except' clause does nothing but pass and there is no explanatory comment.
| try: | |
| import numpy # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import hypothesis # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import cereal | |
| except ImportError: | |
| pass | |
| try: | |
| from opendbc import car # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.tools.lib.logreader import LogReader # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import casadi # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.common.params import Params # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.selfdrive.test import helpers # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import parameterized # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| import cereal.messaging # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from cereal import log # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from panda import Panda # noqa: F401 | |
| except ImportError: | |
| pass | |
| try: | |
| from openpilot.system.manager.process_config import managed_processes # noqa: F401 | |
| except ImportError: | |
| pass | |
| with contextlib.suppress(ImportError): | |
| import numpy # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| import hypothesis # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| import cereal | |
| with contextlib.suppress(ImportError): | |
| from opendbc import car # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| from openpilot.tools.lib.logreader import LogReader # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| import casadi # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| from openpilot.common.params import Params # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| from openpilot.selfdrive.test import helpers # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| import parameterized # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| import cereal.messaging # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| from cereal import log # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| from panda import Panda # noqa: F401 | |
| with contextlib.suppress(ImportError): | |
| from openpilot.system.manager.process_config import managed_processes # noqa: F401 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Import of 'numpy' is not used.