This commit is contained in:
parent
669983298f
commit
70c6d2f746
@ -10,6 +10,6 @@ except ImportError:
|
||||
|
||||
|
||||
try:
|
||||
__version__ = pkg_resources.get_distribution('flat_tree').version
|
||||
__version__ = pkg_resources.get_distribution("flat_tree").version
|
||||
except Exception:
|
||||
__version__ = 'unknown'
|
||||
__version__ = "unknown"
|
||||
|
@ -1,6 +1,6 @@
|
||||
"""An accessor for navigating flat trees."""
|
||||
|
||||
__all__ = ['FlatTreeAccessor']
|
||||
__all__ = ["FlatTreeAccessor"]
|
||||
|
||||
from typing import List, Optional
|
||||
|
||||
@ -155,7 +155,7 @@ class FlatTreeAccessor:
|
||||
:param index: The index of the root of the tree
|
||||
"""
|
||||
if index & 1:
|
||||
message = 'Roots only available for tree depth 0'
|
||||
message = "Roots only available for tree depth 0"
|
||||
raise ValueError(message)
|
||||
|
||||
roots: List[int] = []
|
||||
|
@ -1,6 +1,6 @@
|
||||
"""Stateful iterator for flat trees."""
|
||||
|
||||
__all__ = ['FlatTreeIterator']
|
||||
__all__ = ["FlatTreeIterator"]
|
||||
|
||||
import attr
|
||||
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
|
||||
def test_version_fails_gracefully(mocker):
|
||||
target = 'pkg_resources.get_distribution'
|
||||
target = "pkg_resources.get_distribution"
|
||||
mocker.patch(target, side_effect=Exception())
|
||||
|
||||
from flat_tree.__init__ import __version__
|
||||
|
||||
assert __version__ == 'unknown'
|
||||
assert __version__ == "unknown"
|
||||
|
Loading…
Reference in New Issue
Block a user