Skip to content

Commit

Permalink
Small fixes for modern flake8. (#772)
Browse files Browse the repository at this point in the history
Make sure to use isinstance instead of type.

Signed-off-by: Chris Lalancette <[email protected]>
  • Loading branch information
clalancette authored Mar 25, 2024
1 parent 6531219 commit 9502006
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions launch/test/launch/actions/test_push_and_pop_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down Expand Up @@ -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)

0 comments on commit 9502006

Please sign in to comment.