1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
Description: Fix syntaxWarning s
Bug-Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1085582
Author: Alastair McKinstry <mckinstry@debian.org>
Last-Updated: 2024-10-22
Forwarded: no
--- a/src/fparser/common/readfortran.py
+++ b/src/fparser/common/readfortran.py
@@ -1323,7 +1323,7 @@
"""
Return the next source item.
- A source item is:
+ A source item is \
- a fortran line
- a list of continued fortran lines
- a multiline - lines inside triple-quotes, only when in ispyf mode
--- a/src/fparser/tests/test_issue8.py
+++ b/src/fparser/tests/test_issue8.py
@@ -66,7 +66,7 @@
def test_reproduce_issue():
- source_str = """\
+ source_str = r"""\
subroutine gwinput_v2x(ifi,konf,ncore)
integer :: ifi, !File handle. Write
& konf(0:lmxamx,nclass),! Principle
@@ -81,7 +81,7 @@
end
"""
tree = api.parse(source_str, isfree=False, isstrict=False, ignore_comments=False)
- expected = """
+ expected = r"""
! BEGINSOURCE <cStringIO.StringI object at 0x1e52ea0> mode=fix90
SUBROUTINE gwinput_v2x(ifi, konf, ncore)
INTEGER ifi, konf(0:lmxamx,nclass), ncore(nclass)
--- a/src/fparser/two/pattern_tools.py
+++ b/src/fparser/two/pattern_tools.py
@@ -63,7 +63,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
# DAMAGE.
-"""
+r"""
Tools for constructing patterns.
Permission to use, modify, and distribute this software is given under the
|