Skip to content

Commit d938da2

Browse files
committed
Lint fix
1 parent 90dcbba commit d938da2

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

test/__init__.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,12 @@ def modified_environ(self, *remove, **update):
3939
"""
4040
Temporarily updates the ``os.environ`` dictionary in-place.
4141
42-
The ``os.environ`` dictionary is updated in-place so that the modification
43-
is sure to work in all situations.
42+
The ``os.environ`` dictionary is updated in-place so that
43+
the modification is sure to work in all situations.
4444
4545
:param remove: Environment variables to remove.
46-
:param update: Dictionary of environment variables and values to add/update.
46+
:param update: Dictionary of environment variables and values to
47+
add/update.
4748
"""
4849
env = os.environ
4950
update = update or {}
@@ -58,11 +59,13 @@ def modified_environ(self, *remove, **update):
5859

5960
try:
6061
env.update(update)
61-
[env.pop(k, None) for k in remove]
62+
for k in remove:
63+
env.pop(k, None)
6264
yield
6365
finally:
6466
env.update(update_after)
65-
[env.pop(k) for k in remove_after]
67+
for k in remove_after:
68+
env.pop(k)
6669

6770
# pylint: disable=invalid-name
6871
def assertPathsEqual(self, path1, path2):

test/test_install_cmdstan.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
"""install_cmdstan test"""
22

3-
import os
43
import unittest
54
from test import CustomTestCase
6-
from unittest.mock import patch
75

86
from cmdstanpy.install_cmdstan import (
97
CmdStanInstallError,

0 commit comments

Comments
 (0)