From 95020063ddbc9e6eda6f85e0113d0e6095decf77 Mon Sep 17 00:00:00 2001 From: Chris Lalancette Date: Mon, 25 Mar 2024 11:07:13 -0400 Subject: [PATCH] Small fixes for modern flake8. (#772) Make sure to use isinstance instead of type. Signed-off-by: Chris Lalancette --- launch/test/launch/actions/test_push_and_pop_environment.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/launch/test/launch/actions/test_push_and_pop_environment.py b/launch/test/launch/actions/test_push_and_pop_environment.py index 5d681b931..577b9f763 100644 --- a/launch/test/launch/actions/test_push_and_pop_environment.py +++ b/launch/test/launch/actions/test_push_and_pop_environment.py @@ -33,7 +33,7 @@ def test_push_and_pop_environment_constructors(): @sandbox_environment_variables def test_push_and_pop_environment_execute(): """Test the execute() of the PopEnvironment and PushEnvironment classes.""" - assert type(os.environ) == os._Environ + assert isinstance(os.environ, os._Environ) context = LaunchContext() @@ -89,4 +89,4 @@ def test_push_and_pop_environment_execute(): assert context.environment['foo'] == 'FOO' # Pushing and popping the environment should not change the type of os.environ - assert type(os.environ) == os._Environ + assert isinstance(os.environ, os._Environ)