Skip to content

Commit

Permalink
Added missing FileLine.from_string method (#252)
Browse files Browse the repository at this point in the history
* added missing FileLine.from_string method

* release v2.1.16

* release v2.1.16
  • Loading branch information
ChrisTimperley authored Sep 3, 2018
1 parent a0b0236 commit 1266286
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
## 2.1.16 (2018-08-31)
## 2.1.16 (2018-09-03)

### Features

* Added ability to specify Docker Client API version.

### Changes

* Added `from_string` method to `FileLine`.


## 2.1.15 (2018-08-23)

Expand Down
6 changes: 6 additions & 0 deletions bugzoo/core/fileline.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ class FileLine(object):
filename = attr.ib(type=str)
num = attr.ib(type=int)

@staticmethod
def from_string(s: str) -> 'FileLine':
fn, _, s_num = s.rpartition(':')
num = int(s_num)
return FileLine(fn, num)

@staticmethod
def compactify(d: Dict['FileLine', Any]) -> Dict[str, Dict[int, Any]]:
"""
Expand Down
2 changes: 1 addition & 1 deletion bugzoo/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '2.1.15'
__version__ = '2.1.16'

0 comments on commit 1266286

Please sign in to comment.