Use double quotes

Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
Thomas Lauf 2022-09-27 21:45:20 +02:00
parent 601050ae1f
commit 8103d49e52
4 changed files with 8 additions and 8 deletions

View file

@ -1,7 +1,7 @@
import signal
sig_names = dict((k, v) for v, k in reversed(sorted(signal.__dict__.items()))
if v.startswith('SIG') and not v.startswith('SIG_'))
if v.startswith("SIG") and not v.startswith("SIG_"))
class CommandError(Exception):

View file

@ -7,7 +7,7 @@ class BaseTestCase(unittest.TestCase):
def tap(self, out):
sys.stderr.write("--- tap output start ---\n")
for line in out.splitlines():
sys.stderr.write(line + '\n')
sys.stderr.write(line + "\n")
sys.stderr.write("--- tap output end ---\n")

View file

@ -36,8 +36,8 @@ class Timew(object):
# Configuration of the isolated environment
self._original_pwd = os.getcwd()
self.datadir = tempfile.mkdtemp(prefix="timew_")
self.timewrc = os.path.join (self.datadir, 'timewarrior.cfg')
self.extdir = os.path.join(self.datadir, 'extensions')
self.timewrc = os.path.join(self.datadir, "timewarrior.cfg")
self.extdir = os.path.join(self.datadir, "extensions")
# Ensure any instance is properly destroyed at session end
atexit.register(lambda: self.destroy())

View file

@ -20,7 +20,7 @@ except ImportError:
import json
from .exceptions import CommandError, TimeoutWaitingFor
ON_POSIX = 'posix' in sys.builtin_module_names
ON_POSIX = "posix" in sys.builtin_module_names
# Directory relative to basetest module location
CURRENT_DIR = os.path.dirname(os.path.abspath(__file__))
@ -126,7 +126,7 @@ def _queue_output(arguments, pidq, outputq):
out, err = proc.communicate(input)
if sys.version_info > (3,):
out, err = out.decode('utf-8'), err.decode('utf-8')
out, err = out.decode("utf-8"), err.decode("utf-8")
# Give the output back to the caller
outputq.put((out, err, proc.returncode))
@ -340,8 +340,8 @@ def parse_datafile(file):
line = line.rstrip("\n")
# Turn [] strings into {} to be treated properly as JSON hashes
if line.startswith('[') and line.endswith(']'):
line = '{' + line[1:-1] + '}'
if line.startswith("[") and line.endswith("]"):
line = "{" + line[1:-1] + "}"
if line.startswith("{"):
data.append(json.loads(line))