Hello community,

here is the log from the commit of package python-fire for openSUSE:Factory 
checked in at 2019-09-13 15:02:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-fire (Old)
 and      /work/SRC/openSUSE:Factory/.python-fire.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-fire"

Fri Sep 13 15:02:51 2019 rev:6 rq:730554 version:0.2.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-fire/python-fire.changes  2019-07-30 
12:39:38.130931283 +0200
+++ /work/SRC/openSUSE:Factory/.python-fire.new.7948/python-fire.changes        
2019-09-13 15:04:19.233269463 +0200
@@ -1,0 +2,6 @@
+Fri Sep 13 07:44:29 UTC 2019 - Tomáš Chvátal <tchva...@suse.com>
+
+- Update to 0.2.1:
+  * Improves robustness of docstring parser in the face of unexpected format 
docstrings. #183
+
+-------------------------------------------------------------------

Old:
----
  fire-0.2.0.tar.gz

New:
----
  fire-0.2.1.tar.gz

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

Other differences:
------------------
++++++ python-fire.spec ++++++
--- /var/tmp/diff_new_pack.HTh9cD/_old  2019-09-13 15:04:19.693269365 +0200
+++ /var/tmp/diff_new_pack.HTh9cD/_new  2019-09-13 15:04:19.697269364 +0200
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-fire
-Version:        0.2.0
+Version:        0.2.1
 Release:        0
 Summary:        A library for automatically generating command line interfaces
 License:        Apache-2.0

++++++ fire-0.2.0.tar.gz -> fire-0.2.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fire-0.2.0/PKG-INFO new/fire-0.2.1/PKG-INFO
--- old/fire-0.2.0/PKG-INFO     2019-07-26 19:24:16.000000000 +0200
+++ new/fire-0.2.1/PKG-INFO     2019-08-01 20:21:19.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: fire
-Version: 0.2.0
+Version: 0.2.1
 Summary: A library for automatically generating command line interfaces.
 Home-page: https://github.com/google/python-fire
 Author: David Bieber
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fire-0.2.0/fire/__init__.py 
new/fire-0.2.1/fire/__init__.py
--- old/fire-0.2.0/fire/__init__.py     2019-07-26 19:14:05.000000000 +0200
+++ new/fire-0.2.1/fire/__init__.py     2019-08-01 20:19:04.000000000 +0200
@@ -21,4 +21,4 @@
 from fire.core import Fire
 
 __all__ = ['Fire']
-__version__ = '0.2.0'
+__version__ = '0.2.1'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fire-0.2.0/fire/docstrings.py 
new/fire-0.2.1/fire/docstrings.py
--- old/fire-0.2.0/fire/docstrings.py   2019-07-26 19:14:05.000000000 +0200
+++ new/fire-0.2.1/fire/docstrings.py   2019-08-01 20:19:04.000000000 +0200
@@ -188,14 +188,9 @@
   yields = _join_lines(state.yields.lines)
   raises = _join_lines(state.raises.lines)
 
-  args = [
-      ArgInfo(
-          name=arg.name,
-          type=_cast_to_known_type(_join_lines(arg.type.lines)),
-          description=_join_lines(arg.description.lines),
-      )
-      for arg in state.args
-  ]
+  args = [ArgInfo(
+      name=arg.name, type=_cast_to_known_type(_join_lines(arg.type.lines)),
+      description=_join_lines(arg.description.lines)) for arg in state.args]
 
   return DocstringInfo(
       summary=summary,
@@ -503,10 +498,12 @@
   line_info.remaining_raw = line_info.line
   line_info.remaining = line_info.stripped
   line_info.indentation = len(line) - len(line.lstrip())
+  # TODO(dbieber): If next_line is blank, use the next non-blank line.
   line_info.next.line = next_line
-  line_info.next.stripped = next_line.strip() if next_line else None
+  next_line_exists = next_line is not None
+  line_info.next.stripped = next_line.strip() if next_line_exists else None
   line_info.next.indentation = (
-      len(next_line) - len(next_line.lstrip()) if next_line else None)
+      len(next_line) - len(next_line.lstrip()) if next_line_exists else None)
   # Note: This counts all whitespace equally.
   return line_info
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fire-0.2.0/fire/docstrings_test.py 
new/fire-0.2.1/fire/docstrings_test.py
--- old/fire-0.2.0/fire/docstrings_test.py      2019-07-26 19:14:05.000000000 
+0200
+++ new/fire-0.2.1/fire/docstrings_test.py      2019-08-01 20:19:04.000000000 
+0200
@@ -34,7 +34,7 @@
     expected_docstring_info = DocstringInfo(
         summary='A simple one line docstring.',
     )
-    self.assertEqual(docstring_info, expected_docstring_info)
+    self.assertEqual(expected_docstring_info, docstring_info)
 
   def test_one_line_simple_whitespace(self):
     docstring = """
@@ -44,7 +44,7 @@
     expected_docstring_info = DocstringInfo(
         summary='A simple one line docstring.',
     )
-    self.assertEqual(docstring_info, expected_docstring_info)
+    self.assertEqual(expected_docstring_info, docstring_info)
 
   def test_one_line_too_long(self):
     # pylint: disable=line-too-long
@@ -57,7 +57,7 @@
         'a little too long so it keeps going well beyond a reasonable length '
         'for a one-liner.',
     )
-    self.assertEqual(docstring_info, expected_docstring_info)
+    self.assertEqual(expected_docstring_info, docstring_info)
 
   def test_one_line_runs_over(self):
     # pylint: disable=line-too-long
@@ -70,7 +70,7 @@
         summary='A one line docstring thats both a little too verbose and '
         'a little too long so it runs onto a second line.',
     )
-    self.assertEqual(docstring_info, expected_docstring_info)
+    self.assertEqual(expected_docstring_info, docstring_info)
 
   def test_one_line_runs_over_whitespace(self):
     docstring = """
@@ -82,7 +82,7 @@
         summary='A one line docstring thats both a little too verbose and '
         'a little too long so it runs onto a second line.',
     )
-    self.assertEqual(docstring_info, expected_docstring_info)
+    self.assertEqual(expected_docstring_info, docstring_info)
 
   def test_google_format_args_only(self):
     docstring = """One line description.
@@ -99,7 +99,7 @@
             ArgInfo(name='arg2', description='arg2_description'),
         ]
     )
-    self.assertEqual(docstring_info, expected_docstring_info)
+    self.assertEqual(expected_docstring_info, docstring_info)
 
   def test_google_format_arg_named_args(self):
     docstring = """
@@ -112,7 +112,7 @@
             ArgInfo(name='args', description='arg_description'),
         ]
     )
-    self.assertEqual(docstring_info, expected_docstring_info)
+    self.assertEqual(expected_docstring_info, docstring_info)
 
   def test_google_format_typed_args_and_returns(self):
     docstring = """Docstring summary.
@@ -140,7 +140,7 @@
         ],
         returns='bool: The return value. True for success, False otherwise.'
     )
-    self.assertEqual(docstring_info, expected_docstring_info)
+    self.assertEqual(expected_docstring_info, docstring_info)
 
   def test_rst_format_typed_args_and_returns(self):
     docstring = """Docstring summary.
@@ -169,7 +169,7 @@
         returns='int -- description of the return value.',
         raises='AttributeError, KeyError',
     )
-    self.assertEqual(docstring_info, expected_docstring_info)
+    self.assertEqual(expected_docstring_info, docstring_info)
 
   def test_numpy_format_typed_args_and_returns(self):
     docstring = """Docstring summary.
@@ -203,7 +203,7 @@
         # TODO(dbieber): Support return type.
         returns='bool True if successful, False otherwise.',
     )
-    self.assertEqual(docstring_info, expected_docstring_info)
+    self.assertEqual(expected_docstring_info, docstring_info)
 
   def test_multisection_docstring(self):
     docstring = """Docstring summary.
@@ -222,7 +222,20 @@
         '\n'
         'description has just two sections.',
     )
-    self.assertEqual(docstring_info, expected_docstring_info)
+    self.assertEqual(expected_docstring_info, docstring_info)
+
+  def test_google_section_with_blank_first_line(self):
+    docstring = """Inspired by requests HTTPAdapter docstring.
+
+    :param x: Simple param.
+
+    Usage:
+
+      >>> import requests
+    """
+    docstring_info = docstrings.parse(docstring)
+    self.assertEqual('Inspired by requests HTTPAdapter docstring.',
+                     docstring_info.summary)
 
   def test_ill_formed_docstring(self):
     docstring = """Docstring summary.
@@ -238,7 +251,7 @@
     lines = ['   ', '  foo  ', '   ']
     expected_output = ['  foo  ']
 
-    self.assertEqual(docstrings._strip_blank_lines(lines), expected_output)  # 
pylint: disable=protected-access
+    self.assertEqual(expected_output, docstrings._strip_blank_lines(lines))  # 
pylint: disable=protected-access
 
 
 if __name__ == '__main__':
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fire-0.2.0/fire/test_components.py 
new/fire-0.2.1/fire/test_components.py
--- old/fire-0.2.0/fire/test_components.py      2019-07-26 19:14:05.000000000 
+0200
+++ new/fire-0.2.1/fire/test_components.py      2019-08-01 20:19:04.000000000 
+0200
@@ -465,3 +465,36 @@
     True.
   """
   return True
+
+
+class BinaryCanvas(object):
+  """A canvas with which to make binary art, one bit at a time."""
+
+  def __init__(self, size=10):
+    self.pixels = [[0] * size for _ in range(size)]
+    self._size = size
+    self._row = 0  # The row of the cursor.
+    self._col = 0  # The column of the cursor.
+
+  def __str__(self):
+    return '\n'.join(
+        ' '.join(str(pixel) for pixel in row) for row in self.pixels)
+
+  def show(self):
+    print(self)
+    return self
+
+  def move(self, row, col):
+    self._row = row % self._size
+    self._col = col % self._size
+    return self
+
+  def on(self):
+    return self.set(1)
+
+  def off(self):
+    return self.set(0)
+
+  def set(self, value):
+    self.pixels[self._row][self._col] = value
+    return self
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fire-0.2.0/fire.egg-info/PKG-INFO 
new/fire-0.2.1/fire.egg-info/PKG-INFO
--- old/fire-0.2.0/fire.egg-info/PKG-INFO       2019-07-26 19:24:16.000000000 
+0200
+++ new/fire-0.2.1/fire.egg-info/PKG-INFO       2019-08-01 20:21:19.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: fire
-Version: 0.2.0
+Version: 0.2.1
 Summary: A library for automatically generating command line interfaces.
 Home-page: https://github.com/google/python-fire
 Author: David Bieber
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fire-0.2.0/setup.py new/fire-0.2.1/setup.py
--- old/fire-0.2.0/setup.py     2019-07-26 19:14:05.000000000 +0200
+++ new/fire-0.2.1/setup.py     2019-08-01 20:19:04.000000000 +0200
@@ -40,7 +40,7 @@
     'python-Levenshtein',
 ]
 
-VERSION = '0.2.0'
+VERSION = '0.2.1'
 URL = 'https://github.com/google/python-fire'
 
 setup(


Reply via email to