Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-pyls-spyder for 
openSUSE:Factory checked in at 2021-02-25 18:27:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pyls-spyder (Old)
 and      /work/SRC/openSUSE:Factory/.python-pyls-spyder.new.2378 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pyls-spyder"

Thu Feb 25 18:27:04 2021 rev:3 rq:874535 version:0.3.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pyls-spyder/python-pyls-spyder.changes    
2020-12-22 11:52:43.966122476 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-pyls-spyder.new.2378/python-pyls-spyder.changes
  2021-02-25 18:27:05.090166742 +0100
@@ -1,0 +2,8 @@
+Mon Feb 22 20:20:09 UTC 2021 - Ben Greiner <c...@bnavigator.de>
+
+- Update to version 0.3.2
+  * Fix code blocks regular expression
+  * Ensure that block comments start by 4 dashes or number signs
+  * Fix code folding of cells
+
+-------------------------------------------------------------------

Old:
----
  pyls-spyder-0.3.0-gh.tar.gz

New:
----
  pyls-spyder-0.3.2-gh.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-pyls-spyder.spec ++++++
--- /var/tmp/diff_new_pack.B8XB3F/_old  2021-02-25 18:27:05.706167142 +0100
+++ /var/tmp/diff_new_pack.B8XB3F/_new  2021-02-25 18:27:05.710167144 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pyls-spyder
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define skip_python2 1
 Name:           python-pyls-spyder
-Version:        0.3.0
+Version:        0.3.2
 Release:        0
 Summary:        Spyder extensions for the python-language-server
 License:        MIT

++++++ pyls-spyder-0.3.0-gh.tar.gz -> pyls-spyder-0.3.2-gh.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyls-spyder-0.3.0/CHANGELOG.md 
new/pyls-spyder-0.3.2/CHANGELOG.md
--- old/pyls-spyder-0.3.0/CHANGELOG.md  2020-12-11 22:03:46.000000000 +0100
+++ new/pyls-spyder-0.3.2/CHANGELOG.md  2021-02-16 05:02:24.000000000 +0100
@@ -1,3 +1,34 @@
+## Version 0.3.2 (2021-02-16)
+
+### Issues Closed
+
+* [Issue 22](https://github.com/spyder-ide/pyls-spyder/issues/22) - Release 
v0.3.2
+* [Issue 20](https://github.com/spyder-ide/pyls-spyder/issues/20) - Fix code 
blocks regular expression ([PR 
21](https://github.com/spyder-ide/pyls-spyder/pull/21) by 
[@andfoy](https://github.com/andfoy))
+
+In this release 2 issues were closed.
+
+### Pull Requests Merged
+
+* [PR 21](https://github.com/spyder-ide/pyls-spyder/pull/21) - PR: Ensure that 
block comments start by 4 dashes or number signs, by 
[@andfoy](https://github.com/andfoy) 
([20](https://github.com/spyder-ide/pyls-spyder/issues/20))
+
+In this release 1 pull request was closed.
+
+
+## Version 0.3.1 (2021-02-15)
+
+### Issues Closed
+
+* [Issue 19](https://github.com/spyder-ide/pyls-spyder/issues/19) - Release 
v0.3.1
+
+In this release 1 issue was closed.
+
+### Pull Requests Merged
+
+* [PR 18](https://github.com/spyder-ide/pyls-spyder/pull/18) - PR: Fix code 
folding of cells, by [@remisalmon](https://github.com/remisalmon) 
([14730](https://github.com/spyder-ide/spyder/issues/14730))
+
+In this release 1 pull request was closed.
+
+
 ## Version 0.3.0 (2020/12/11)
 
 ### Issues Closed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyls-spyder-0.3.0/pyls_spyder/__init__.py 
new/pyls-spyder-0.3.2/pyls_spyder/__init__.py
--- old/pyls-spyder-0.3.0/pyls_spyder/__init__.py       2020-12-11 
22:03:46.000000000 +0100
+++ new/pyls-spyder-0.3.2/pyls_spyder/__init__.py       2021-02-16 
05:02:24.000000000 +0100
@@ -8,5 +8,5 @@
 
 """Spyder extensions for the python-language-server."""
 
-VERSION_INFO = (0, 3, 0)
+VERSION_INFO = (0, 3, 2)
 __version__ = '.'.join(map(str, VERSION_INFO))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyls-spyder-0.3.0/pyls_spyder/plugin.py 
new/pyls-spyder-0.3.2/pyls_spyder/plugin.py
--- old/pyls-spyder-0.3.0/pyls_spyder/plugin.py 2020-12-11 22:03:46.000000000 
+0100
+++ new/pyls-spyder-0.3.2/pyls_spyder/plugin.py 2021-02-16 05:02:24.000000000 
+0100
@@ -40,10 +40,10 @@
 # Block comment regular expressions
 # 1. Block comments declared with 4 dashes, i.e., # ---- Block comment
 BLOCK_DASH = (
-    'BLOCK_DASH', re.compile(r'^[\t ]*# ?-{4}([^-\n\r]?.*)?$'))
+    'BLOCK_DASH', re.compile(r'^[\t ]*# ?-{4}([^-\n\r].*)?$'))
 # 2. Block comments declared with 3 consecutive hashes, i.e., #### Comment
 BLOCK_HASH = (
-    'BLOCK_HASH', re.compile(r'^[\t ]*##{3}([^\#\n\r]?.*)?$'))
+    'BLOCK_HASH', re.compile(r'^[\t ]*##{3}([^\#\n\r].*)?$'))
 
 BLOCK_REGEX = RegexEvaluator(dict([BLOCK_DASH, BLOCK_HASH]))
 
@@ -133,7 +133,12 @@
                             current_name) = peek_symbol(cell_stack)
                     cell_stack.insert(0, (line_num, cell_level, cell_name))
         elif block_match is not None and enable_block_comments:
-            block_name = block_match.group(1).strip()
+            block_name = block_match.group(1)
+            if block_name is None:
+                block_name = ''
+            else:
+                block_name = block_name.strip()
+
             if block_name == '':
                 block_name = 'Unnamed comment {0}'.format(unnamed_block)
                 unnamed_block += 1
@@ -171,10 +176,10 @@
             else:
                 while current_level >= cell_level:
                     cell_stack.pop(0)
-                    cells.append(create_fold_region(current_line, line_num))
+                    cells.append(create_fold_region(current_line, line_num - 
1))
                     current_line, current_level, _ = peek_symbol(cell_stack)
                 cell_stack.insert(0, (line_num, cell_level, ''))
     for line, _, name in cell_stack:
-        cells.append(create_fold_region(line, line_num + 1))
+        cells.append(create_fold_region(line, line_num))
     cells = sorted(cells, key=lambda x: x['startLine'])
     return cells
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pyls-spyder-0.3.0/pyls_spyder/tests/test_plugin.py 
new/pyls-spyder-0.3.2/pyls_spyder/tests/test_plugin.py
--- old/pyls-spyder-0.3.0/pyls_spyder/tests/test_plugin.py      2020-12-11 
22:03:46.000000000 +0100
+++ new/pyls-spyder-0.3.2/pyls_spyder/tests/test_plugin.py      2021-02-16 
05:02:24.000000000 +0100
@@ -44,8 +44,11 @@
 # In[25]
 ####
 
-#%% Empty cell
+#%% Invalid comments
 #----
+# ---------- This should not work
+###### This either
+#%% Empty cell
 """
 
 
@@ -74,8 +77,9 @@
         ('Pass inside b', 17, 17, 224),
         ('25', 20, 20, 225),
         ('Unnamed comment 2', 21, 21, 224),
-        ('Empty cell', 23, 24, 225),
-        ('Unnamed comment 3', 24, 24, 224)
+        ('Invalid comments', 23, 26, 225),
+        ('Unnamed comment 3', 24, 24, 224),
+        ('Empty cell', 27, 27, 225)
     ]
     test_results = []
     for symbol in symbols:
@@ -105,8 +109,9 @@
         ('Pass inside b', 17, 17, 224),
         ('25', 20, 20, 225),
         ('Unnamed comment 2', 21, 21, 224),
-        ('Empty cell', 23, 23, 225),
-        ('Unnamed comment 3', 24, 24, 224)
+        ('Invalid comments', 23, 23, 225),
+        ('Unnamed comment 3', 24, 24, 224),
+        ('Empty cell', 27, 27, 225)
     ]
     test_results = []
     for symbol in symbols:
@@ -131,7 +136,8 @@
         ('Cell', 12, 14, 225),
         ('Unnamed cell 2', 15, 22, 225),
         ('25', 20, 20, 225),
-        ('Empty cell', 23, 24, 225)
+        ('Invalid comments', 23, 26, 225),
+        ('Empty cell', 27, 27, 225)
     ]
     test_results = []
     for symbol in symbols:
@@ -149,13 +155,14 @@
     document = Document(DOC_URI, workspace, DOC)
     regions = pyls_folding_range(config, workspace, document)
     expected = [
-        (1, 23),
-        (6, 10),
-        (10, 15),
-        (12, 15),
-        (15, 23),
-        (20, 23),
-        (23, 25)
+        (1, 22),
+        (6, 9),
+        (10, 14),
+        (12, 14),
+        (15, 22),
+        (20, 22),
+        (23, 26),
+        (27, 27)
     ]
     test_results = []
     for region in regions:

Reply via email to