commit 07fe5c2928253dcf911d3983d11e078879191ebcfded39d26761a71682909036 Author: Todd R Date: Thu May 24 20:56:33 2018 +0000 Accepting request 612019 from devel:languages:python:misc Formats docstrings to follow PEP 257 OBS-URL: https://build.opensuse.org/request/show/612019 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-docformatter?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/docformatter-1.0.tar.gz b/docformatter-1.0.tar.gz new file mode 100644 index 0000000..bc2d29f --- /dev/null +++ b/docformatter-1.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:036eba7c12669dc67c0ccaa3c40e2add3cc729af6a5fa4a2a54517bc09e10237 +size 16447 diff --git a/python-docformatter.changes b/python-docformatter.changes new file mode 100644 index 0000000..2301a8f --- /dev/null +++ b/python-docformatter.changes @@ -0,0 +1,14 @@ +------------------------------------------------------------------- +Thu May 24 17:31:41 UTC 2018 - toddrme2178@gmail.com + +- Update to version 1.0 + * Document and test disabling of wrapping + * Add @kapsh + * Make text wrapping trigger more conservative + * Adds support for argument lists +- Spec file cleanups + +------------------------------------------------------------------- +Tue Nov 7 18:41:21 UTC 2017 - toddrme2178@gmail.com + +- initial version diff --git a/python-docformatter.spec b/python-docformatter.spec new file mode 100644 index 0000000..31cbb76 --- /dev/null +++ b/python-docformatter.spec @@ -0,0 +1,79 @@ +# +# spec file for package python-docformatter +# +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +Name: python-docformatter +Version: 1.0 +Release: 0 +License: MIT +Summary: Formats docstrings to follow PEP 257 +Url: https://github.com/myint/docformatter +Group: Development/Languages/Python +Source: https://files.pythonhosted.org/packages/source/d/docformatter/docformatter-%{version}.tar.gz +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +# SECTION test requirements +BuildRequires: %{python_module untokenize} +# /SECTION +Requires: python-untokenize +BuildArch: noarch + +%python_subpackages + +%description +Docformatter currently automatically formats docstrings to follow a +subset of the PEP 257 conventions. Below are the relevant items quoted +from PEP 257. + +- For consistency, always use triple double quotes around docstrings. +- Triple quotes are used even though the string fits on one line. +- Multi-line docstrings consist of a summary line just like a one-line + docstring, followed by a blank line, followed by a more elaborate + description. +- The BDFL recommends inserting a blank line between the last paragraph + in a multi-line docstring and its closing quotes, placing the closing + quotes on a line by themselves. + +docformatter also handles some of the PEP 8 conventions. + +- Don't write string literals that rely on significant trailing + whitespace. Such trailing whitespace is visually indistinguishable + and some editors (or more recently, reindent.py) will trim them. + + +%prep +%setup -q -n docformatter-%{version} +sed -i -e '/^#!\//, 1d' docformatter.py + +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%python_exec setup.py test + +%files %{python_files} +%doc AUTHORS.rst README.rst +%python3_only %{_bindir}/docformatter +%{python_sitelib}/* + +%changelog