-
Notifications
You must be signed in to change notification settings - Fork 36
Use an iterator to get the vts when get_vts cmd is called #216
Conversation
Codecov Report
@@ Coverage Diff @@
## master #216 +/- ##
==========================================
+ Coverage 73.66% 73.71% +0.05%
==========================================
Files 18 18
Lines 2119 2127 +8
==========================================
+ Hits 1561 1568 +7
- Misses 558 559 +1
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #216 +/- ##
==========================================
+ Coverage 73.66% 73.71% +0.05%
==========================================
Files 18 18
Lines 2119 2127 +8
==========================================
+ Hits 1561 1568 +7
- Misses 558 559 +1
Continue to review full report at Codecov.
|
@@ -546,7 +546,6 @@ def test_scan_with_error(self): | |||
) | |||
response = fs.get_response() | |||
scan_id = response.findtext('id') | |||
print(scan_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ups...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the pr just a little bit now to make the types more strict and obvious.
ospd/vts.py
Outdated
def items(self): | ||
return self.vts.items() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO we can ensure that items already returns an iterator.
def items(self): | |
return self.vts.items() | |
def items(self) -> Iterator[Tuple[str, str]]: | |
return iter(self.vts.items()) | |
ospd/ospd.py
Outdated
def get_vt_iterator(self) -> Iterable: | ||
""" Return iterator object for getting elements | ||
from the VTs dictionary. """ | ||
return iter(self.vts.items()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def get_vt_iterator(self) -> Iterable: | |
""" Return iterator object for getting elements | |
from the VTs dictionary. """ | |
return iter(self.vts.items()) | |
def get_vt_iterator(self) -> Iterator[Tuple[str,str]]: | |
""" Return iterator object for getting elements | |
from the VTs dictionary. """ | |
return self.vts.items() |
No description provided.