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

Empty only #118 #122

Merged
merged 9 commits into from
Nov 23, 2018
Merged

Empty only #118 #122

merged 9 commits into from
Nov 23, 2018

Conversation

rupertford
Copy link
Collaborator

I've made the changes (which were small) and moved the associated tests into the fortran2003 directory, tidied etc. I think we're ready for first review.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 88.06% when pulling 7cee0e4 on empty_only into b009dbf on master.

@coveralls
Copy link

coveralls commented Nov 8, 2018

Coverage Status

Coverage increased (+0.07%) to 88.121% when pulling 65e5280 on empty_only into c856517 on master.

@rupertford
Copy link
Collaborator Author

Thanks to @TeranIvy for volunteering to review.

Copy link
Collaborator

@TeranIvy TeranIvy left a comment

Choose a reason for hiding this comment

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

Nicely done. I only have a couple of small remarks.

  • Tests pass.
  • Documentation builds (PDF and HTML).
  • pyecodestyle on modified files is OK.
  • pylint on Fortran2003.py reports 2 warnings and it would be good to update one comment as well (see inline comments).
  • All lines in class Use_Stmt are covered by tests. The tests are moved to a separate file with full support for R1109.
  • x-failing tests are not affected by the current issue.
  • No change in the documentation is required as this is a bug fix.

"Use_Stmt.tostr(). 'Items' should be of size 5 but found "
"'{0}'.".format(len(self.items)))
if not self.items[2]:
raise InternalError("Use_Stmt.tostr(). 'Items' entry 2 should "
Copy link
Collaborator

Choose a reason for hiding this comment

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

pylint says W:7343, 0: Bad indentation. Found 16 spaces, expected 12 (bad-indentation)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oops, I missed that. Thanks.

raise InternalError("Use_Stmt.tostr(). 'Items' entry 2 should "
"be a module name but it is empty")
if self.items[3] is None:
raise InternalError("Use_Stmt.tostr(). 'Items' entry 3 should "
Copy link
Collaborator

Choose a reason for hiding this comment

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

pylint says W:7346, 0: Bad indentation. Found 16 spaces, expected 12 (bad-indentation)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

And again.

# Missing 'ONLY' specification after 'USE Module_Name,'
if not line:
return
if line[:4].upper() == 'ONLY':
line = line[4:].lstrip()
if not line:
# Expected ':' but there is nothing after the 'ONLY'
Copy link
Collaborator

Choose a reason for hiding this comment

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

This comment describes nicely what the if test does. It is quite similar to the comment in line 7318 which is not the best description of what the if test in 7319 does (tests that character after ONLY is not the permitted :).
Would you kindly update the comment in 7318? I am aware the original developer made it unclear :-)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've hopefully made it more clear :-)

@TeranIvy TeranIvy added reviewed with actions PR has been reviewed and is back with developer and removed under review labels Nov 23, 2018
@rupertford
Copy link
Collaborator Author

I've hopefully addressed the reviewers comments. Back to @TeranIvy for second review.

@codecov-io
Copy link

codecov-io commented Nov 23, 2018

Codecov Report

Merging #122 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #122      +/-   ##
==========================================
+ Coverage   88.13%   88.13%   +<.01%     
==========================================
  Files          31       31              
  Lines       11264    11273       +9     
==========================================
+ Hits         9927     9936       +9     
  Misses       1337     1337
Impacted Files Coverage Δ
src/fparser/two/Fortran2003.py 90.24% <100%> (+0.02%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c856517...65e5280. Read the comment docs.

@rupertford rupertford added ready for review and removed reviewed with actions PR has been reviewed and is back with developer labels Nov 23, 2018
@TeranIvy
Copy link
Collaborator

Looks good and pylint warnings are fixed. I had to refresh the branch prior to merge to master so I can then edit changelog again and then merge.

Copy link
Collaborator

@TeranIvy TeranIvy left a comment

Choose a reason for hiding this comment

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

All fine, proceeding to merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants