commit cc8406cdbbe4a35a08fb72462c343623ffa8bb5f
parent 4595863eb47ff2857207b986ee778cdf9c256c8f
Author: Asher Morgan <asher@ashermorgan.net>
Date: Wed, 26 Aug 2026 20:05:38 -0700
Add .editorconfig and ruff.toml
Diffstat:
4 files changed, 30 insertions(+), 6 deletions(-)
diff --git a/.editorconfig b/.editorconfig
@@ -0,0 +1,14 @@
+# https://editorconfig.org
+
+root = true
+
+[*]
+charset = utf-8
+end_of_line = lf
+indent_style = space
+indent_size = 4
+insert_final_newline = true
+trim_trailing_whitespace = true
+
+[*.py]
+max_line_length = 80
diff --git a/aoh/connection_plugins/aoh.py b/aoh/connection_plugins/aoh.py
@@ -33,7 +33,11 @@ import os
import select
import typing as t
-from ansible.errors import AnsibleConnectionFailure, AnsibleError, AnsibleFileNotFound
+from ansible.errors import (
+ AnsibleConnectionFailure,
+ AnsibleError,
+ AnsibleFileNotFound,
+)
from ansible.plugins.connection import ConnectionBase
from ansible.utils.display import Display
@@ -137,7 +141,7 @@ class Connection(ConnectionBase):
assert self.recvpoll is not None
if not os.path.exists(in_path):
- raise AnsibleFileNotFound(f'file or module does not exist: {in_path}')
+ raise AnsibleFileNotFound(f'File does not exist: {in_path}')
with open(in_path, 'rb') as f:
data = base64.b64encode(f.read()).decode()
diff --git a/aoh/runner.py b/aoh/runner.py
@@ -192,8 +192,8 @@ class Runner:
if self._recvbuf:
try:
- # Send an error in case the AoH connection plugin is currently
- # blocking on a read
+ # Send an error in case the AoH connection plugin is
+ # currently blocking on a read
self._recvbuf.write('{"err":"Runner teardown"}\n')
self._recvbuf.flush()
except BrokenPipeError:
@@ -211,8 +211,8 @@ class Runner:
pass
if self._thread:
- # The Ansible runner *should* exit if it hasn't already due to a
- # broken recvbuf pipe or the sendbuf error.
+ # The Ansible runner *should* exit if it hasn't already due to
+ # a broken recvbuf pipe or the sendbuf error.
self._thread.join(10)
if self._thread.is_alive():
raise RunnerError('Ansible runner thread not terminated')
diff --git a/ruff.toml b/ruff.toml
@@ -0,0 +1,6 @@
+line-length = 80
+
+[lint]
+extend-select = [
+ "E501", # line-too-long
+]