---
source: crates/ruff/src/rules/pyupgrade/mod.rs
---
UP021.py:6:25: UP021 [*] `universal_newlines` is deprecated, use `text`
  |
6 | from subprocess import run as anothername
7 | 
8 | subprocess.run(["foo"], universal_newlines=True, check=True)
  |                         ^^^^^^^^^^^^^^^^^^ UP021
9 | somename.run(["foo"], universal_newlines=True)
  |
  = help: Replace with `text` keyword argument

ℹ Suggested fix
3 3 | from subprocess import run
4 4 | from subprocess import run as anothername
5 5 | 
6   |-subprocess.run(["foo"], universal_newlines=True, check=True)
  6 |+subprocess.run(["foo"], text=True, check=True)
7 7 | somename.run(["foo"], universal_newlines=True)
8 8 | 
9 9 | run(["foo"], universal_newlines=True, check=False)

UP021.py:7:23: UP021 [*] `universal_newlines` is deprecated, use `text`
   |
 7 | subprocess.run(["foo"], universal_newlines=True, check=True)
 8 | somename.run(["foo"], universal_newlines=True)
   |                       ^^^^^^^^^^^^^^^^^^ UP021
 9 | 
10 | run(["foo"], universal_newlines=True, check=False)
   |
   = help: Replace with `text` keyword argument

ℹ Suggested fix
4 4 | from subprocess import run as anothername
5 5 | 
6 6 | subprocess.run(["foo"], universal_newlines=True, check=True)
7   |-somename.run(["foo"], universal_newlines=True)
  7 |+somename.run(["foo"], text=True)
8 8 | 
9 9 | run(["foo"], universal_newlines=True, check=False)
10 10 | anothername(["foo"], universal_newlines=True)

UP021.py:9:14: UP021 [*] `universal_newlines` is deprecated, use `text`
   |
 9 | somename.run(["foo"], universal_newlines=True)
10 | 
11 | run(["foo"], universal_newlines=True, check=False)
   |              ^^^^^^^^^^^^^^^^^^ UP021
12 | anothername(["foo"], universal_newlines=True)
   |
   = help: Replace with `text` keyword argument

ℹ Suggested fix
6  6  | subprocess.run(["foo"], universal_newlines=True, check=True)
7  7  | somename.run(["foo"], universal_newlines=True)
8  8  | 
9     |-run(["foo"], universal_newlines=True, check=False)
   9  |+run(["foo"], text=True, check=False)
10 10 | anothername(["foo"], universal_newlines=True)
11 11 | 
12 12 | subprocess.run(["foo"], check=True)

UP021.py:10:22: UP021 [*] `universal_newlines` is deprecated, use `text`
   |
10 | run(["foo"], universal_newlines=True, check=False)
11 | anothername(["foo"], universal_newlines=True)
   |                      ^^^^^^^^^^^^^^^^^^ UP021
12 | 
13 | subprocess.run(["foo"], check=True)
   |
   = help: Replace with `text` keyword argument

ℹ Suggested fix
7  7  | somename.run(["foo"], universal_newlines=True)
8  8  | 
9  9  | run(["foo"], universal_newlines=True, check=False)
10    |-anothername(["foo"], universal_newlines=True)
   10 |+anothername(["foo"], text=True)
11 11 | 
12 12 | subprocess.run(["foo"], check=True)


