style: reorder subprocess args to keep cwd consistent

This commit is contained in:
Paul Gauthier (aider) 2024-11-26 19:55:07 -08:00
parent 1a745e4fa9
commit 415652d38e

View file

@ -49,11 +49,11 @@ class Linter:
try:
process = subprocess.Popen(
cmd,
cwd=self.root,
stdout=subprocess.PIPE,
stderr=subprocess.STDOUT,
encoding=self.encoding,
errors="replace",
cwd=self.root,
)
except OSError as err:
print(f"Unable to execute lint command: {err}")
@ -152,12 +152,12 @@ class Linter:
try:
result = subprocess.run(
flake8_cmd,
cwd=self.root,
capture_output=True,
text=True,
check=False,
encoding=self.encoding,
errors="replace",
cwd=self.root,
)
errors = result.stdout + result.stderr
except Exception as e: