aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-05-09 15:16:23 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-05-09 20:33:35 +0200
commitd0ab64626c70953b94a9d0a66f66c624f0a3ad5a (patch)
tree673d0219a73190685125b8ed2bebb945be8ef7b0
parentrefactor(hm/conf/zsh): Move xdg vars under the xdg directory (diff)
downloadnixos-config-d0ab64626c70953b94a9d0a66f66c624f0a3ad5a.zip
style(treewide): Comply with `nix fmt`
-rwxr-xr-xhm/soispha/conf/firefox/scripts/unzip_mozlz4.py2
-rwxr-xr-xhm/soispha/conf/taskwarrior/hooks/scripts/on-modify_track-timewarrior.py4
-rw-r--r--sys/nixpkgs/pkgs/plgs-pkgs/plugins/plugins.md2
-rw-r--r--sys/nixpkgs/pkgs/update_vim_plugins/update_vim_plugins/spec.py2
-rw-r--r--sys/nixpkgs/pkgs/update_vim_plugins/update_vim_plugins/tests/fixtures.py2
-rw-r--r--sys/nixpkgs/pkgs/update_vim_plugins/update_vim_plugins/tests/test_nix.py2
-rw-r--r--sys/nixpkgs/pkgs/update_vim_plugins/update_vim_plugins/tests/test_plugin.py4
-rwxr-xr-xsys/secrets/update.sh1
8 files changed, 8 insertions, 11 deletions
diff --git a/hm/soispha/conf/firefox/scripts/unzip_mozlz4.py b/hm/soispha/conf/firefox/scripts/unzip_mozlz4.py
index 44e00d53..9a2348bf 100755
--- a/hm/soispha/conf/firefox/scripts/unzip_mozlz4.py
+++ b/hm/soispha/conf/firefox/scripts/unzip_mozlz4.py
@@ -38,7 +38,7 @@ if __name__ == "__main__":
import sys
args = sys.argv[1:]
- if args and not args[0] in ("--help", "-h"):
+ if args and args[0] not in ("--help", "-h"):
main(args)
else:
print("Usage: mozlz4.py <mozlz4 file to read> <location to write>")
diff --git a/hm/soispha/conf/taskwarrior/hooks/scripts/on-modify_track-timewarrior.py b/hm/soispha/conf/taskwarrior/hooks/scripts/on-modify_track-timewarrior.py
index c8efb596..b482af6a 100755
--- a/hm/soispha/conf/taskwarrior/hooks/scripts/on-modify_track-timewarrior.py
+++ b/hm/soispha/conf/taskwarrior/hooks/scripts/on-modify_track-timewarrior.py
@@ -68,7 +68,7 @@ if "tags" in new:
combined = " ".join(["'%s'" % tag for tag in tags]).encode("utf-8").strip()
# Task has been started.
-if "start" in new and not "start" in old:
+if "start" in new and "start" not in old:
# Prevent this task from starting if "task +ACTIVE count" is greater than "MAX_ACTIVE".
p = subprocess.Popen(
["task", "+ACTIVE", "status:pending", "count", "rc.verbose:off"],
@@ -86,7 +86,7 @@ if "start" in new and not "start" in old:
system("timew start " + combined.decode() + " :yes")
# Task has been stopped.
-elif not "start" in new and "start" in old:
+elif "start" not in new and "start" in old:
system("timew stop " + combined.decode() + " :yes")
# Any task that is active, with a non-pending status should not be tracked.
diff --git a/sys/nixpkgs/pkgs/plgs-pkgs/plugins/plugins.md b/sys/nixpkgs/pkgs/plgs-pkgs/plugins/plugins.md
index b8263464..48909e76 100644
--- a/sys/nixpkgs/pkgs/plgs-pkgs/plugins/plugins.md
+++ b/sys/nixpkgs/pkgs/plgs-pkgs/plugins/plugins.md
@@ -1,4 +1,4 @@
- - Plugin count: 3
+- Plugin count: 3
| Repo | Last Update | Nix package name | Last checked |
|:---|:---|:---|:---|
diff --git a/sys/nixpkgs/pkgs/update_vim_plugins/update_vim_plugins/spec.py b/sys/nixpkgs/pkgs/update_vim_plugins/update_vim_plugins/spec.py
index edbd876b..0f2fb29c 100644
--- a/sys/nixpkgs/pkgs/update_vim_plugins/update_vim_plugins/spec.py
+++ b/sys/nixpkgs/pkgs/update_vim_plugins/update_vim_plugins/spec.py
@@ -27,7 +27,7 @@ class PluginSpec:
name is the name to use for the plugin (default is value of repo).
"""
repository_host = RepositoryHost.GITHUB
- gitref = "master"
+ # gitref = "master"
repository_host_regex = r"((?P<repository_host>[^:]+):)"
owner_regex = r"(?P<owner>[^/:]+)"
diff --git a/sys/nixpkgs/pkgs/update_vim_plugins/update_vim_plugins/tests/fixtures.py b/sys/nixpkgs/pkgs/update_vim_plugins/update_vim_plugins/tests/fixtures.py
index a90d67c6..75dd251a 100644
--- a/sys/nixpkgs/pkgs/update_vim_plugins/update_vim_plugins/tests/fixtures.py
+++ b/sys/nixpkgs/pkgs/update_vim_plugins/update_vim_plugins/tests/fixtures.py
@@ -3,7 +3,7 @@ import json
import pytest
from pytest_mock import MockerFixture
-from update_vim_plugins.nix import GitSource, License, UrlSource
+from update_vim_plugins.nix import GitSource, UrlSource
@pytest.fixture()
diff --git a/sys/nixpkgs/pkgs/update_vim_plugins/update_vim_plugins/tests/test_nix.py b/sys/nixpkgs/pkgs/update_vim_plugins/update_vim_plugins/tests/test_nix.py
index 5d6e51b1..46e59f76 100644
--- a/sys/nixpkgs/pkgs/update_vim_plugins/update_vim_plugins/tests/test_nix.py
+++ b/sys/nixpkgs/pkgs/update_vim_plugins/update_vim_plugins/tests/test_nix.py
@@ -1,7 +1,5 @@
from update_vim_plugins.nix import GitSource, License, UrlSource
-from .fixtures import git_source, rev, sha256, url, url_source
-
def test_url_source(url_source: UrlSource, url: str, sha256: str):
assert url_source.url == url
diff --git a/sys/nixpkgs/pkgs/update_vim_plugins/update_vim_plugins/tests/test_plugin.py b/sys/nixpkgs/pkgs/update_vim_plugins/update_vim_plugins/tests/test_plugin.py
index 27d1a8db..32377e24 100644
--- a/sys/nixpkgs/pkgs/update_vim_plugins/update_vim_plugins/tests/test_plugin.py
+++ b/sys/nixpkgs/pkgs/update_vim_plugins/update_vim_plugins/tests/test_plugin.py
@@ -4,12 +4,10 @@ from typing import Callable
import pytest
from pytest_mock import MockFixture
-from update_vim_plugins.nix import License, Source, UrlSource
+from update_vim_plugins.nix import License, UrlSource
from update_vim_plugins.plugin import GitHubPlugin, VimPlugin
from update_vim_plugins.spec import PluginSpec
-from .fixtures import sha256, url, url_source
-
@pytest.fixture()
def mock_source(sha256: str):
diff --git a/sys/secrets/update.sh b/sys/secrets/update.sh
index 82aea59e..edc4ae8a 100755
--- a/sys/secrets/update.sh
+++ b/sys/secrets/update.sh
@@ -1,5 +1,6 @@
#!/usr/bin/env nix
#! nix shell nixpkgs#age nixpkgs#jq nixpkgs#dash --command dash
+# shellcheck shell=dash
cleanup() {
[ "$key_file" ] && rm "$key_file"