Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flake8 errors #470

Merged
merged 7 commits into from
Jan 18, 2019
Merged

Fix flake8 errors #470

merged 7 commits into from
Jan 18, 2019

Conversation

rht
Copy link
Contributor

@rht rht commented Jan 3, 2019

In particular:

  1. E501 (line too long, not all)
  2. E231 (whitespace stuff)
  3. F405 (import wildcard)
  4. F841 (unused vars, this requires manual review)

@coveralls
Copy link

coveralls commented Jan 3, 2019

Coverage Status

Coverage decreased (-0.008%) to 93.891% when pulling a50612c on rht:F401 into a72b98a on QuantEcon:master.

quantecon/lss.py Outdated Show resolved Hide resolved
@@ -291,6 +290,7 @@ def test_goldstein_price(self):
bounds = np.array([[-2., 2.],
[-2., 2.]])

# TODO: why is `bounds` not passed to the argument here?
Copy link
Contributor

@mmcky mmcky Jan 3, 2019

Choose a reason for hiding this comment

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

@QBatista would you have time to check this? (previously tagged @cc7768 -- sorry)

@@ -35,7 +35,7 @@ def setUp(self):
deltah = np.array([[.9]])
thetah = np.array([[1]]) - deltah
ub = np.array([[30, 0, 0]])
x0 = np.array([[5, 150,1,0,0]]).T
# x0 = np.array([[5, 150, 1, 0, 0]]).T # unused
Copy link
Contributor

Choose a reason for hiding this comment

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

@natashawatkins would you have time to check this?

Copy link
Member

Choose a reason for hiding this comment

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

it's not used anywhere else in this file, but I can't figure out why it's there in the first place

@@ -53,7 +53,7 @@ def test_stationarity(self):


def test_update_using_stationary(self):
A, Q, G, R = self.A, self.Q, self.G, self.R
# A, Q, G, R = self.A, self.Q, self.G, self.R # unused
Copy link
Contributor

Choose a reason for hiding this comment

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

@natashawatkins would you have time to check this?

Copy link
Member

Choose a reason for hiding this comment

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

not used in this function - was probably just copied from above

@@ -81,7 +81,7 @@ def test_stationary_mat(self):
lq_mat = self.lq_mat

f_answer = np.array([[-.95, -.95], [0., 0.]])
p_answer = np.array([[1., 0], [0., 0.]])
# p_answer = np.array([[1., 0], [0., 0.]]) # unused
Copy link
Contributor

Choose a reason for hiding this comment

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

@natashawatkins would you have time to check this?

Copy link
Member

Choose a reason for hiding this comment

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

doesn't appear to be used

@mmcky
Copy link
Contributor

mmcky commented Jan 3, 2019

thanks @rht.

I have tagged a few contributors to check a few of the F841 commented lines to make sure they aren't needed.

@mmcky
Copy link
Contributor

mmcky commented Jan 11, 2019

thanks for the updates @rht.
@natashawatkins are you able to review the unused code items tagged in this PR? If they are unused then we should delete them.

@mmcky
Copy link
Contributor

mmcky commented Jan 18, 2019

@rht would you mind deleting the unused items that are current commented?

@mmcky
Copy link
Contributor

mmcky commented Jan 18, 2019

thanks for review @natashawatkins

@rht
Copy link
Contributor Author

rht commented Jan 18, 2019

Assuming that that means all the unused variables detected by F841: I have just removed them.

@rht
Copy link
Contributor Author

rht commented Jan 18, 2019

There are few remaining,

./docs/sphinxext/ipython_console_highlighting.py:62:9: F841 local variable 'tblexer' is assigned to but never used
./quantecon/robustlq.py:246:18: F841 local variable 'Q' is assigned to but never used
./quantecon/robustlq.py:246:21: F841 local variable 'R' is assigned to but never used
./quantecon/robustlq.py:247:9: F841 local variable 'beta' is assigned to but never used
./quantecon/robustlq.py:385:9: F841 local variable 'Q' is assigned to but never used
./quantecon/robustlq.py:385:12: F841 local variable 'R' is assigned to but never used
./quantecon/robustlq.py:395:9: F841 local variable 'sig' is assigned to but never used
./quantecon/kalman.py:162:12: F841 local variable 'k' is assigned to but never used
./quantecon/lss.py:395:18: F841 local variable 'H' is assigned to but never used
./quantecon/dle.py:80:9: F841 local variable 'phiing' is assigned to but never used
./quantecon/dle.py:309:9: F841 local variable 'Cc' is assigned to but never used
./quantecon/game_theory/repeated_game.py:125:5: F841 local variable 'C' is assigned to but never used

but I have to keep the PR lean for now.

@mmcky
Copy link
Contributor

mmcky commented Jan 18, 2019

OK - thanks @rht

@mmcky mmcky merged commit 4518f66 into QuantEcon:master Jan 18, 2019
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.

None yet

5 participants