SHA256
1
0
forked from pool/python-yapf

Accepting request 582349 from home:jengelh:branches:devel:languages:python

- Trim description and focus on the package, not the process.

OBS-URL: https://build.opensuse.org/request/show/582349
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-yapf?expand=0&rev=2
This commit is contained in:
Tomáš Chvátal 2018-03-04 11:10:46 +00:00 committed by Git OBS Bridge
parent 6789e7c807
commit 84a20ed3dc
2 changed files with 16 additions and 19 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Sun Mar 4 11:06:23 UTC 2018 - jengelh@inai.de
- Trim description and focus on the package, not the process.
-------------------------------------------------------------------
Fri Oct 20 16:19:54 UTC 2017 - toddrme2178@gmail.com

View File

@ -1,7 +1,7 @@
#
# spec file for package python-yapf
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# 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
@ -13,6 +13,7 @@
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
@ -20,10 +21,10 @@
Name: python-yapf
Version: 0.19.0
Release: 0
License: Apache-2.0
Summary: A formatter for Python code
Url: https://github.com/google/yapf
License: Apache-2.0
Group: Development/Languages/Python
Url: https://github.com/google/yapf
Source: https://files.pythonhosted.org/packages/source/y/yapf/yapf-%{version}.tar.gz
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
@ -43,23 +44,14 @@ Requires(postun): update-alternatives
%python_subpackages
%description
Most of the current formatters for Python --- e.g., autopep8, and pep8ify ---
are made to remove lint errors from code. This has some obvious limitations.
For instance, code that conforms to the PEP 8 guidelines may not be
reformatted. But it doesn't mean that the code looks good.
YAPF is based off clang-format and reformats it to the closest
formatting that conforms to the style guide, even if the original
code did not violate the style guide.
YAPF takes a different approach. It's based off of 'clang-format', developed by
Daniel Jasper. In essence, the algorithm takes the code and reformats it to the
best formatting that conforms to the style guide, even if the original code
didn't violate the style guide. The idea is also similar to the 'gofmt' tool for
the Go programming language: end all holy wars about formatting - if the whole
codebase of a project is simply piped through YAPF whenever modifications are
made, the style remains consistent throughout the project and there's no point
arguing about style in every code review.
The ultimate goal is that the code YAPF produces is as good as the code that a
programmer would write if they were following the style guide. It takes away
some of the drudgery of maintaining your code.
This is in contrast to other formatters like autopep8 and pep8ify
which are made to only remove lint errors from code, which has some
limitations, like, code that conforms to the PEP 8 guidelines may not
be reformatted.
%prep
%setup -q -n yapf-%{version}