Skip to content

Commit

Permalink
making optional things Optional (#1182)
Browse files Browse the repository at this point in the history
Signed-off-by: Anton Kesy <[email protected]>
  • Loading branch information
antonkesy authored Oct 11, 2023
1 parent 565c508 commit 5b7e531
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rclpy/rclpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def create_node(
node_name: str,
*,
context: Optional[Context] = None,
cli_args: List[str] = None,
cli_args: Optional[List[str]] = None,
namespace: Optional[str] = None,
use_global_arguments: bool = True,
enable_rosout: bool = True,
Expand Down
4 changes: 3 additions & 1 deletion rclpy/rclpy/clock.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from typing import Optional

from rclpy.impl.implementation_singleton import rclpy_implementation as _rclpy

from .context import Context
Expand Down Expand Up @@ -187,7 +189,7 @@ def callback_shim(jump_dict):
clock=self, threshold=threshold, pre_callback=pre_callback,
post_callback=post_callback)

def sleep_until(self, until: Time, context: Context = None) -> bool:
def sleep_until(self, until: Time, context: Optional[Context] = None) -> bool:
"""
Sleep until a specific time on this Clock is reached.
Expand Down
2 changes: 1 addition & 1 deletion rclpy/rclpy/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def __init__(
node_name: str,
*,
context: Optional[Context] = None,
cli_args: List[str] = None,
cli_args: Optional[List[str]] = None,
namespace: Optional[str] = None,
use_global_arguments: bool = True,
enable_rosout: bool = True,
Expand Down

0 comments on commit 5b7e531

Please sign in to comment.