forked from pool/python-blue
- Update to 0.8.0 * Fix compatibility with flake8 v4 (GH#58) - Drop support-new-flake8.patch fixed upstream - Add unpin-black.patch and unpin-tomli.patch - Clean requirements OBS-URL: https://build.opensuse.org/request/show/963034 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-blue?expand=0&rev=10
30 lines
1.3 KiB
Diff
30 lines
1.3 KiB
Diff
Index: blue-0.8.0/blue/__init__.py
|
|
===================================================================
|
|
--- blue-0.8.0.orig/blue/__init__.py
|
|
+++ blue-0.8.0/blue/__init__.py
|
|
@@ -387,8 +387,9 @@ def main():
|
|
'Black', 'Blue'
|
|
)
|
|
# Change the config param callback to support setup.cfg, tox.ini, etc.
|
|
- config_param = black.main.params[21]
|
|
- assert config_param.name == 'config'
|
|
+ # the index changed somewhere between black 21.7b and 21.12b
|
|
+ cfgidx = {p.name: i for (i, p) in enumerate(black.main.params)}['config']
|
|
+ config_param = black.main.params[cfgidx]
|
|
config_param.callback = read_configs
|
|
# Change the version string by adding a redundant Click `version_option`
|
|
# decorator on `black.main`. Fortunately the added `version_option` takes
|
|
Index: blue-0.8.0/setup.py
|
|
===================================================================
|
|
--- blue-0.8.0.orig/setup.py
|
|
+++ blue-0.8.0/setup.py
|
|
@@ -37,7 +37,7 @@ setup(
|
|
packages=['blue'],
|
|
tests_require=['tox'],
|
|
cmdclass={'test': Tox},
|
|
- install_requires=['black==21.7b0', 'flake8>=3.8'],
|
|
+ install_requires=['black>=21.7b0', 'flake8>=3.8'],
|
|
project_urls={
|
|
'Documentation': 'https://blue.readthedocs.io/en/latest',
|
|
'Source': 'https://github.com/grantjenks/blue.git',
|