14
0
forked from pool/python-black

Accepting request 1142193 from devel:languages:python

- update to 24.1.0:
  * Add parentheses around `if`-`else` expressions
  * Dummy class and function implementations consisting only of
    `...` are formatted more compactly
  * If an assignment statement is too long, we now prefer
    splitting on the right-hand side
  * Hex codes in Unicode escape sequences are now standardized to
    lowercase
  * Allow empty first lines at the beginning of most blocks
  * Add parentheses around long type annotations
  * Enforce newline after module docstrings
  * Fix incorrect magic trailing comma handling in return types
  * Remove blank lines before class docstrings
  * Wrap multiple context managers in parentheses if combined in
    a single `with` statement
  * Fix bug in line length calculations for power operations
  * Add trailing commas to collection literals even if there's a
    comment after the last entry
  * When using `--skip-magic-trailing-comma` or `-C`, trailing
    commas are stripped from subscript expressions with more than
    1 element
  * Add extra blank lines in stubs in a few cases
  * Accept raw strings as docstrings
  * Split long lines in case blocks
  * Stop removing spaces from walrus operators within subscripts
  * Fix incorrect formatting of certain async statements
  * Allow combining `# fmt: skip` with other comments
  * There are already a few improvements in the `--preview`
    style, which are slated for the 2025 stable style. Try them
    out and share your feedback. In the past, the preview

OBS-URL: https://build.opensuse.org/request/show/1142193
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-black?expand=0&rev=25
This commit is contained in:
2024-01-29 21:26:55 +00:00
committed by Git OBS Bridge
4 changed files with 78 additions and 5 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4ce3ef14ebe8d9509188014d96af1c456a910d5b5cbf434a09fef7e024b3d0d5
size 620809

3
black-24.1.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:30fbf768cd4f4576598b1db0202413fafea9a227ef808d1a12230c643cefe9fc
size 622911

View File

@@ -1,3 +1,76 @@
-------------------------------------------------------------------
Mon Jan 29 08:51:18 UTC 2024 - Dirk Müller <dmueller@suse.com>
- update to 24.1.0:
* Add parentheses around `if`-`else` expressions
* Dummy class and function implementations consisting only of
`...` are formatted more compactly
* If an assignment statement is too long, we now prefer
splitting on the right-hand side
* Hex codes in Unicode escape sequences are now standardized to
lowercase
* Allow empty first lines at the beginning of most blocks
* Add parentheses around long type annotations
* Enforce newline after module docstrings
* Fix incorrect magic trailing comma handling in return types
* Remove blank lines before class docstrings
* Wrap multiple context managers in parentheses if combined in
a single `with` statement
* Fix bug in line length calculations for power operations
* Add trailing commas to collection literals even if there's a
comment after the last entry
* When using `--skip-magic-trailing-comma` or `-C`, trailing
commas are stripped from subscript expressions with more than
1 element
* Add extra blank lines in stubs in a few cases
* Accept raw strings as docstrings
* Split long lines in case blocks
* Stop removing spaces from walrus operators within subscripts
* Fix incorrect formatting of certain async statements
* Allow combining `# fmt: skip` with other comments
* There are already a few improvements in the `--preview`
style, which are slated for the 2025 stable style. Try them
out and share your feedback. In the past, the preview
style has included some features that we were not able to
stabilize. This year, we're adding a separate `--unstable`
style for features with known problems. Now, the `--preview`
style only includes features that we actually expect to make
it into next year's stable style.
* Fix comment handling when parenthesising conditional
expressions
* Fix bug where spaces were not added around parenthesized
walruses in subscripts, unlike other binary operators
* Remove empty lines before docstrings in async functions
* Address a missing case in the change to allow empty lines at
the beginning of all blocks, except immediately before a
docstring
* For stubs, fix logic to enforce empty line after nested
classes with bodies
* Add `--unstable` style, covering preview features that have
known problems that would block them from going into the
stable style. Also add the `--enable-unstable-feature`
flag; for example, use `--enable-unstable-feature
hug_parens_with_braces_and_square_brackets` to apply this
preview feature throughout 2024, even if a later Black
release downgrades the feature to unstable
* Format module docstrings the same as class and function
docstrings
* Fix crash when using a walrus in a dictionary
* Fix unnecessary parentheses when wrapping long dicts
* Stop normalizing spaces before `# fmt: skip` comments
* Print warning when configuration in `pyproject.toml` contains
an invalid key
* Fix symlink handling, properly ignoring symlinks that point
outside of root
* Fix cache mtime logic that resulted in false positive cache
hits
* Remove the long-deprecated `--experimental-string-processing`
flag. This feature can currently be enabled with `--preview
--enable-unstable- feature string_processing`.
* Revert the change to run Black's pre-commit integration only
on specific git hooks (#3940) for better compatibility with
older versions of pre-commit
-------------------------------------------------------------------
Tue Jan 2 08:19:30 UTC 2024 - Dirk Müller <dmueller@suse.com>

View File

@@ -18,7 +18,7 @@
%{?sle15_python_module_pythons}
Name: python-black
Version: 23.12.1
Version: 24.1.0
Release: 0
Summary: A code formatter written in, and written for Python
License: MIT
@@ -55,7 +55,7 @@ Requires: python-pathspec >= 0.9.0
Requires: python-platformdirs >= 2
Requires: python-tomli >= 1.1.0
Requires(post): update-alternatives
Requires(postun):update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%if 0%{?python_version_nodots} < 311
Requires: python-typing_extensions >= 3.10.0.0