Skip to content

Commit

Permalink
target: Make all Target.__init__() parameters after working_directory…
Browse files Browse the repository at this point in the history
… keyword-only

Prevent Target argument soup and allow future non-breaking evolutions of the Target
API by restricting what parameters can be positional. Only
"connection_settings", "platform" and "working_directory" can now be
passed positionally, all the other ones must be passed as keyword
arguments.
  • Loading branch information
douglas-raillard-arm committed Nov 20, 2024
1 parent c137b5b commit 765d6b7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions devlib/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ def __init__(self,
connection_settings=None,
platform=None,
working_directory=None,
*,
executables_directory=None,
tmp_directory=None,
connect=True,
Expand Down Expand Up @@ -1791,6 +1792,7 @@ def __init__(self,
connection_settings=None,
platform=None,
working_directory=None,
*,
executables_directory=None,
tmp_directory=None,
connect=True,
Expand Down Expand Up @@ -2001,6 +2003,7 @@ def __init__(self,
connection_settings=None,
platform=None,
working_directory=None,
*,
executables_directory=None,
tmp_directory=None,
connect=True,
Expand Down Expand Up @@ -3089,6 +3092,7 @@ def __init__(self,
connection_settings=None,
platform=None,
working_directory=None,
*,
executables_directory=None,
tmp_directory=None,
connect=True,
Expand Down Expand Up @@ -3175,6 +3179,7 @@ def __init__(self,
connection_settings=None,
platform=None,
working_directory=None,
*,
executables_directory=None,
android_working_directory=None,
android_executables_directory=None,
Expand Down

0 comments on commit 765d6b7

Please sign in to comment.