wip
This commit is contained in:
commit
01a96c14d4
18 changed files with 2108 additions and 0 deletions
25
scripts/lint
Executable file
25
scripts/lint
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
#!/bin/sh -eu
|
||||
|
||||
if [ "${1:-}" = '--fix' ]; then
|
||||
autoflake \
|
||||
--remove-duplicate-keys \
|
||||
--remove-unused-variables \
|
||||
--remove-all-unused-imports \
|
||||
--ignore-init-module-imports \
|
||||
--recursive \
|
||||
--in-place \
|
||||
.
|
||||
isort --profile black .
|
||||
black .
|
||||
else
|
||||
autoflake \
|
||||
--remove-duplicate-keys \
|
||||
--remove-unused-variables \
|
||||
--remove-all-unused-imports \
|
||||
--ignore-init-module-imports \
|
||||
--recursive \
|
||||
--check \
|
||||
.
|
||||
isort --profile black --check .
|
||||
black --check .
|
||||
fi
|
||||
23
scripts/ls
Executable file
23
scripts/ls
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/sh -eu
|
||||
|
||||
# Create a `ingest-ls` compatible file listing.
|
||||
#
|
||||
# Compatible with current versions of GNU and macOS `ls`.
|
||||
#
|
||||
# $ scripts/ls -R /some/base/path \
|
||||
# | python -m metadex ingest-ls --remove-missing
|
||||
|
||||
_ls() {
|
||||
if command ls -d --time-style='+%s' . >/dev/null 2>&1; then
|
||||
# echo 'GNU'
|
||||
command ls --time-style='+%s' "$@"
|
||||
elif command ls -d -D '%s' . >/dev/null 2>&1; then
|
||||
# echo 'macOS'
|
||||
command ls -D '%s' "$@"
|
||||
else
|
||||
# echo 'unknown'
|
||||
command ls "$@"
|
||||
fi
|
||||
}
|
||||
|
||||
_ls -lnAU "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue