PSyclone icon indicating copy to clipboard operation
PSyclone copied to clipboard

Add `is_character` method for `Reference` node

Open joewallwork opened this issue 1 year ago • 1 comments

Partially addresses #2717.

This PR merges one of two functions from the types module of PSyACC into PSyclone.

joewallwork avatar Oct 23 '24 15:10 joewallwork

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 99.86%. Comparing base (33ff7e8) to head (87c257b). Report is 16 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2753   +/-   ##
=======================================
  Coverage   99.86%   99.86%           
=======================================
  Files         354      354           
  Lines       48967    48973    +6     
=======================================
+ Hits        48903    48909    +6     
  Misses         64       64           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Oct 23 '24 15:10 codecov[bot]

Could I be a bit cheeky and request a fix for a docstring formatting error from a previous PR? Building the Ref. Guide now gives:

PSyclone/src/psyclone/psyir/nodes/assignment.py:docstring of psyclone.psyir.nodes.Assignment.is_literal_assignment:3: WARNING: Definition list ends without a blank line; unexpected unindent.

which is new!

arporter avatar Oct 29 '24 10:10 arporter

Could I be a bit cheeky and request a fix for a docstring formatting error from a previous PR? Building the Ref. Guide now gives:

PSyclone/src/psyclone/psyir/nodes/assignment.py:docstring of psyclone.psyir.nodes.Assignment.is_literal_assignment:3: WARNING: Definition list ends without a blank line; unexpected unindent.

which is new!

Ah good spot. Apologies, should be fixed in f2952478fc01c8e8d78cad0544dc43efd562054a.

joewallwork avatar Oct 29 '24 11:10 joewallwork

Ah good spot. Apologies, should be fixed in https://github.com/stfc/PSyclone/commit/f2952478fc01c8e8d78cad0544dc43efd562054a.

Ups, I missed this on my review. I think the issue comes from missing the starting colon in the :returns: and :rtype: tags. It is also wrong in the method above.

With this fixed I don't think the backslash is necessary.

sergisiso avatar Oct 29 '24 11:10 sergisiso

Ups, I missed this on my review. I think the issue comes from missing the starting colon in the :returns: and :rtype: tags. It is also wrong in the method above.

With this fixed I don't think the backslash is necessary.

Oh okay, I had just copied the syntax from the method above it. Fixed for both methods in 2c783a787f0b8daacf14f385b75e1d74290e0f65.

joewallwork avatar Oct 29 '24 12:10 joewallwork

This is ready to merge now @jwallwork23 . Note that I ended up changing the "raise Exception" to a "raise ValueError" to avoid the pylint "broad-exception-raised" issue.

I also built the multiple documentations to verify the docstring warnings are gone.

Great, thanks @sergisiso!

joewallwork avatar Oct 30 '24 09:10 joewallwork