mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-15 23:41:12 +00:00
refactoring
This commit is contained in:
5
docs/usage.md
vendored
5
docs/usage.md
vendored
@@ -60,8 +60,9 @@ Importing `~/.mutt/colors` and then `~/.vim/colors` will result in:
|
||||
* `d_mutt_colors` and `d_vim_colors` in the long format
|
||||
|
||||
A dotfile can be imported as a different file with the use
|
||||
of the command line switch `--as` (effectively selecting the `src` part
|
||||
of the dotfile in the config). It is however recommended
|
||||
of the command line switch `--as` (effectively modifying the `src` part
|
||||
of the dotfile in the config, that is the location of the dotfile in the
|
||||
`dotpath`). It is however recommended
|
||||
to use [templating](templating.md) to avoid duplicates and optimize
|
||||
dotfile management.
|
||||
```bash
|
||||
|
||||
@@ -308,7 +308,10 @@ class CfgYaml:
|
||||
return newlink
|
||||
|
||||
def resolve_dotfile_src(self, src, templater=None):
|
||||
"""resolve dotfile src path"""
|
||||
"""
|
||||
get abs src file from a relative path
|
||||
in dotpath
|
||||
"""
|
||||
newsrc = ''
|
||||
if src:
|
||||
new = src
|
||||
@@ -340,9 +343,11 @@ class CfgYaml:
|
||||
def add_dotfile_to_profile(self, dotfile_key, profile_key):
|
||||
"""
|
||||
add an existing dotfile key to a profile_key
|
||||
if profile_key doesn't exist, the profile is created
|
||||
we test using profiles variable since it merges
|
||||
imported ones (include, etc) but insert in main
|
||||
yaml only
|
||||
return True if was added
|
||||
"""
|
||||
# create the profile if it doesn't exist
|
||||
self._new_profile(profile_key)
|
||||
|
||||
@@ -223,8 +223,6 @@ def strip_home(path):
|
||||
|
||||
def must_ignore(paths, ignores, debug=False):
|
||||
"""return true if any paths in list matches any ignore patterns"""
|
||||
if debug:
|
||||
LOG.dbg('must_ignore called', force=True)
|
||||
if not ignores:
|
||||
return False
|
||||
if debug:
|
||||
|
||||
3
tests.sh
vendored
3
tests.sh
vendored
@@ -39,7 +39,7 @@ echo "testing with pylint"
|
||||
# R0915: too-many-statements
|
||||
# R0912: too-many-branches
|
||||
# R0911: too-many-return-statements
|
||||
# C0209: consider-using-f-string
|
||||
# R0904: too-many-public-methods
|
||||
pylint \
|
||||
--disable=R0902 \
|
||||
--disable=R0913 \
|
||||
@@ -48,6 +48,7 @@ pylint \
|
||||
--disable=R0915 \
|
||||
--disable=R0912 \
|
||||
--disable=R0911 \
|
||||
--disable=R0904 \
|
||||
dotdrop/
|
||||
|
||||
set +e
|
||||
|
||||
Reference in New Issue
Block a user