diff --git a/coco/_version.py b/coco/_version.py index 1a4a64f..a54920c 100644 --- a/coco/_version.py +++ b/coco/_version.py @@ -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].""" diff --git a/coco/state.py b/coco/state.py index 5bc7196..6b44984 100644 --- a/coco/state.py +++ b/coco/state.py @@ -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) @@ -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). diff --git a/requirements.txt b/requirements.txt index 9348b55..4c53a75 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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 diff --git a/tests/test_state.py b/tests/test_state.py index 283bfe1..81ca9b6 100644 --- a/tests/test_state.py +++ b/tests/test_state.py @@ -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( @@ -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")