Skip to content

Commit

Permalink
style: blacken and fix docstring for linter
Browse files Browse the repository at this point in the history
  • Loading branch information
aelanman committed Sep 13, 2022
1 parent f5f210e commit 0e54037
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion coco/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class NotThisMethod(Exception):


def register_vcs_handler(vcs, method): # decorator
"""Decorator to mark a method as the handler for a particular VCS."""
"""Mark a method as the handler for a particular VCS (decorator)."""

def decorate(f):
"""Store f in HANDLERS[vcs][method]."""
Expand Down
6 changes: 3 additions & 3 deletions coco/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,9 @@ def read_from_file(self, path, file):
if len(path) != 0:
element, name = self._find_new(path)

new_state = load_config_file(file, return_dict=True, dump=False, jinja_options=None)
new_state = load_config_file(
file, return_dict=True, dump=False, jinja_options=None
)

# Don't load state parts that are excluded from reset
self._exclude_paths(path, new_state)
Expand All @@ -194,8 +196,6 @@ def read_from_file(self, path, file):
else:
element[name] = new_state



def _exclude_paths(self, path, state):
"""
Remove excluded paths from a state (in-place).
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
comet @ git+https://github.com/chime-experiment/comet.git@ael/fixjson#egg=comet
kotekan @ git+https://github.com/kotekan/kotekan.git@develop#egg=kotekan&subdirectory=python/
kotekan @ git+https://github.com/kotekan/kotekan.git@ael/py3_only#egg=kotekan&subdirectory=python/
aiohttp
pyyaml
requests
Expand Down
4 changes: 2 additions & 2 deletions tests/test_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test_exclude():
def test_jinja(tmpdir):
"""Test that .j2 files are parsed properly."""

pytest.importorskip('jinja2')
pytest.importorskip("jinja2")

state_path = tmpdir
test_state = state.State(
Expand All @@ -60,7 +60,7 @@ def test_jinja(tmpdir):
"""
)

with open(tmpdir / "testfile.j2", 'w') as ofile:
with open(tmpdir / "testfile.j2", "w") as ofile:
ofile.write(jinja_code)

test_state.read_from_file("res", tmpdir / "testfile.j2")
Expand Down

0 comments on commit 0e54037

Please sign in to comment.