Skip to content

Remove unused variables, tweak test imports#1

Merged
gingajake merged 1 commit intomasterfrom
kevins-review
Aug 24, 2017
Merged

Remove unused variables, tweak test imports#1
gingajake merged 1 commit intomasterfrom
kevins-review

Conversation

@cowleyk
Copy link
Copy Markdown
Collaborator

@cowleyk cowleyk commented Aug 24, 2017

I'm guessing the range-detector.py file is there for a reason, but want to note that it isn't actually used in the block code

@@ -1,7 +1,5 @@
from nio.block.terminals import DEFAULT_TERMINAL
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused import

from nio.block.terminals import DEFAULT_TERMINAL
from nio.signal.base import Signal
from nio.testing.block_test_case import NIOBlockTestCase
from ..track_objects_block import TrackObjects
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imported in setUp

super().setUp()
sys.modules['cv2'] = MagicMock()
sys.modules['object_tracker'] = MagicMock()
sys.modules['imutils'] = MagicMock()
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to adjust this to get the tests to run locally on my machine, if you don't think this is correct feel free to ignore

@@ -1,6 +1,4 @@
from collections import deque
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused import

@@ -1,6 +1,4 @@
from collections import deque
from enum import Enum
import numpy as np
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused import

def process_signals(self, signals):
counter = 0
(dX, dY) = (0, 0)
direction = ""
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these variables aren't used anywhere, not sure if they're required by openCV?

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those we're used by some functionality that I took out. So they can be removed

break

frame = imutils.resize(frame, width=600)
blurred = cv2.GaussianBlur(frame, (11, 11), 0)
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isn't used anywhere, but may be a future feature?

@gingajake gingajake merged commit c88a74a into master Aug 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants