pyupgrade fixes

This commit is contained in:
Erik Sundell
2021-10-31 11:26:40 +01:00
parent b0375627e3
commit c2c4d708f5
9 changed files with 12 additions and 12 deletions

View File

@@ -59,7 +59,7 @@ def test_ensure_pip_requirements(prefix):
conda.ensure_conda_packages(prefix, ['pip'])
with tempfile.NamedTemporaryFile() as f:
# Sample small package to test
f.write('there'.encode())
f.write(b'there')
f.flush()
conda.ensure_pip_requirements(prefix, f.name)
subprocess.check_call([

View File

@@ -31,7 +31,7 @@ def test_ensure_admins(tljh_dir, admins, expected_config):
installer.ensure_admins(admins)
config_path = installer.CONFIG_FILE
with open(config_path, 'r') as f:
with open(config_path) as f:
config = yaml.load(f)
# verify the list was flattened