Skip to content

Commit ad6d30b

Browse files
committed
chore(syntax): Run through pyupgrade / autoflake
pip install pyupgrade autoflake; \ pyupgrade --py37 tests/**/*.py docs/**/*.py tmuxp/**/*.py; \ poetry run autoflake tests/**/*.py docs/**/*.py tmuxp/**/*.py -i --ignore-init-module-imports; \ make black isort
1 parent 6ae580b commit ad6d30b

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

docs/conf.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# flake8: NOQA E5
22
import inspect
3-
import os
43
import sys
54
from os.path import dirname, relpath
65
from pathlib import Path

tmuxp/cli/freeze.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
def session_completion(ctx, params, incomplete):
1616
t = Server()
1717
choices = [session.name for session in t.list_sessions()]
18-
return sorted([str(c) for c in choices if str(c).startswith(incomplete)])
18+
return sorted(str(c) for c in choices if str(c).startswith(incomplete))
1919

2020

2121
@click.command(name="freeze")

tmuxp/cli/load.py

+5-7
Original file line numberDiff line numberDiff line change
@@ -446,11 +446,9 @@ def config_file_completion(ctx, params, incomplete):
446446

447447
# CWD Paths
448448
choices += sorted(
449-
[
450-
pathlib.Path(os.path.relpath(p, pathlib.Path.cwd()))
451-
for p in [pathlib.Path.cwd(), *pathlib.Path.cwd().parents]
452-
if config.in_dir(str(p)) or len(list(p.glob(".tmuxp.*")))
453-
]
449+
pathlib.Path(os.path.relpath(p, pathlib.Path.cwd()))
450+
for p in [pathlib.Path.cwd(), *pathlib.Path.cwd().parents]
451+
if config.in_dir(str(p)) or len(list(p.glob(".tmuxp.*")))
454452
)
455453
# CWD look one directory up
456454
choices += [
@@ -459,9 +457,9 @@ def config_file_completion(ctx, params, incomplete):
459457
]
460458

461459
# Project configs
462-
choices += sorted([(config_dir / c).stem for c in config.in_dir(str(config_dir))])
460+
choices += sorted((config_dir / c).stem for c in config.in_dir(str(config_dir)))
463461

464-
return sorted([str(c) for c in choices if str(c).startswith(incomplete)])
462+
return sorted(str(c) for c in choices if str(c).startswith(incomplete))
465463

466464

467465
@click.command(name="load", short_help="Load tmuxp workspaces.")

0 commit comments

Comments
 (0)