Run fish_indent --write **/*.fish to format
- ID
cd5df99- date
2024-03-30 18:08:28+00:00- author
Alex Chan <alex@alexwlchan.net>- parent
35beaa6- message
Run `fish_indent --write **/*.fish` to format- changed files
3 files, 19 additions, 19 deletions
Changed files
fish_functions/append_to_file_if_not_exists.fish (570) → fish_functions/append_to_file_if_not_exists.fish (569)
diff --git a/fish_functions/append_to_file_if_not_exists.fish b/fish_functions/append_to_file_if_not_exists.fish
index 6df8e0f..585bc27 100644
--- a/fish_functions/append_to_file_if_not_exists.fish
+++ b/fish_functions/append_to_file_if_not_exists.fish
@@ -9,6 +9,6 @@
#
function append_to_file_if_not_exists --description "Append a line to a file, but only if it's not already there" --argument-names target_file line_to_append
if not grep --quiet --fixed-strings --line-regexp "$line_to_append" "$target_file" 2>/dev/null
- echo "$line_to_append" >> "$target_file"
+ echo "$line_to_append" >>"$target_file"
end
end
fish_functions/auto_activate_venv.fish (1662) → fish_functions/auto_activate_venv.fish (1664)
diff --git a/fish_functions/auto_activate_venv.fish b/fish_functions/auto_activate_venv.fish
index 0db81f1..b09187f 100644
--- a/fish_functions/auto_activate_venv.fish
+++ b/fish_functions/auto_activate_venv.fish
@@ -9,7 +9,7 @@
#
function auto_activate_venv --description "Auto activate/deactivate virtualenv when I change directories"
- # Get the top-level directory of the current Git repo (if any)
+ # Get the top-level directory of the current Git repo (if any)
set REPO_ROOT (git rev-parse --show-toplevel 2>/dev/null)
# Case #1: cd'd into a folder which has a .venv in its root.
fish_functions/pyfmt.fish (559) → fish_functions/pyfmt.fish (615)
diff --git a/fish_functions/pyfmt.fish b/fish_functions/pyfmt.fish
index f49f86a..2daedbf 100644
--- a/fish_functions/pyfmt.fish
+++ b/fish_functions/pyfmt.fish
@@ -1,18 +1,18 @@
function pyfmt --description "Run Python formatting over a directory"
- if test (count $argv) -eq 0
- set root $PWD
- else
- set root $argv[1]
- end
-
- black "$root"
-
- # E501 = line too long; anything up to 100-ish is fine in my book
- # (the "ish" is intentional; see https://www.youtube.com/watch?v=wf-BqAjZb8M)
- #
- # E203/W503/W504 = this is where black and flake8 conflict, see https://black.readthedocs.io/en/stable/faq.html#why-are-flake8-s-e203-and-w503-violated
- flake8 \
- --ignore=E501,E203,W503 --extend-select=W504 \
- --exclude .venv \
- "$root"
-end
\ No newline at end of file
+ if test (count $argv) -eq 0
+ set root $PWD
+ else
+ set root $argv[1]
+ end
+
+ black "$root"
+
+ # E501 = line too long; anything up to 100-ish is fine in my book
+ # (the "ish" is intentional; see https://www.youtube.com/watch?v=wf-BqAjZb8M)
+ #
+ # E203/W503/W504 = this is where black and flake8 conflict, see https://black.readthedocs.io/en/stable/faq.html#why-are-flake8-s-e203-and-w503-violated
+ flake8 \
+ --ignore=E501,E203,W503 --extend-select=W504 \
+ --exclude .venv \
+ "$root"
+end