Fix bug: if construct has name, it must appear in end statement#325
Fix bug: if construct has name, it must appear in end statement#325arporter merged 9 commits intostfc:masterfrom
end statement#325Conversation
Affects following block constructs: - `associate` - `do` (non-label) - `if` - `select case` - `select type` - `where`
Codecov Report
@@ Coverage Diff @@
## master #325 +/- ##
==========================================
+ Coverage 91.28% 91.33% +0.05%
==========================================
Files 36 36
Lines 13010 13028 +18
==========================================
+ Hits 11876 11899 +23
+ Misses 1134 1129 -5
Continue to review full report at Codecov.
|
|
Hi @ZedThree, just getting back up to speed with things. I just have a question about why we need a 'strict' option in addition to the |
arporter
left a comment
There was a problem hiding this comment.
Many thanks for fixing this and adding all of the tests. In general I think it's good but the tests need docstrings and some additional checks to ensure that the error being raised is the one we expect.
src/fparser/two/tests/fortran2003/test_select_type_construct_r821.py
Outdated
Show resolved
Hide resolved
`else`/`case` sub-blocks are allowed to have missing names
Plus docstrings
* master: (44 commits) stfc#336 update changelog stfc#343 update version to 0.0.15 Update changelog stfc#328 update changelog Rename `BeginStatement.handle_unknown_item` Return `None` from unimplemented function Use `f` prefix on all lines of multiline f-string Return `None` explicitly from some functions Remove redundant `return` statements from the end of functions Convert some `str.format()` calls to f-strings Remove py2 `unicode` string literal Remove py2 `unicode` special handling Change type in docstring to py3 style hint Remove reference to py2 from comments/docstring Revert accidental removal of test case Fix wrong variable in error message Remove duplicated `str` in `isinstance` argument pr stfc#322. Updated changelog ready for merge to master. stfc#322 try quoting python versions in GHA yml stfc#322 updates for review ...
|
Changes made. Adding the more explicit checks for the exception messages caught a bug: Also merged in master to fix conflicts |
arporter
left a comment
There was a problem hiding this comment.
Thanks for making all those changes.
I've taken the liberty of fixing various lines that were too long (although I now find that there are a lot of those that are nothing to do with this PR).
I'll proceed to merge.
|
Actually, since I couldn't update the upstream branch (because it's in PlasmaFAIR), I merged it as is and created #346 to do the pycodestyle tidying. |
Affects following block constructs:
associatedo(non-label)ifselect caseselect typewhereThis more strictly implements the constraints on the various blocks, which all have wording similar to the
do-construct:Basically, if you use
name: do, you must useend do name.