Skip to content

Commit

Permalink
Increase minimal required version of python-lsp-black to 2.0
Browse files Browse the repository at this point in the history
That version allows to format code for indented selections.
  • Loading branch information
ccordoba12 committed Dec 19, 2023
1 parent 9df266a commit 0488c59
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 14 deletions.
9 changes: 0 additions & 9 deletions .github/scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ if [ "$USE_CONDA" = "true" ]; then
# Remove pylsp before installing its subrepo below
micromamba remove --force python-lsp-server python-lsp-server-base -y

# Prevent error in a test for the %edit magic
micromamba install ipykernel=6.26.0 -q -y

else
# Update pip and setuptools
python -m pip install -U pip setuptools wheel build
Expand All @@ -49,14 +46,8 @@ else
# This allows the test suite to run more reliably on Linux
pip uninstall pyqt5 pyqt5-qt5 pyqt5-sip pyqtwebengine pyqtwebengine-qt5 -q -y
pip install pyqt5==5.12.* pyqtwebengine==5.12.*

# QDarkstyle 3.2.1 doesn't work with PyQt 5.12
pip install qdarkstyle==3.2
fi

# Prevent error in a test for the %edit magic
pip install ipykernel==6.26.0

fi

# Install subrepos from source
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/installer-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ jobs:
fi
${pythonLocation}/bin/python -m pip install -U pip setuptools wheel
${pythonLocation}/bin/python -m pip install -r req-build.txt -r req-extras.txt -r req-plugins.txt "${INSTALL_FLAGS[@]}" -e ${GITHUB_WORKSPACE}
- name: Add mising file to Black dist-info
run: touch ${pythonLocation}/lib/python3.9/site-packages/black-23.12.0.dist-info/top_level.txt
- name: Install Subrepos
if: ${{github.event_name == 'pull_request'}}
run: ${pythonLocation}/bin/python -bb -X dev -W error ${GITHUB_WORKSPACE}/install_dev_repos.py --not-editable --no-install spyder
Expand All @@ -102,6 +104,8 @@ jobs:
install_name_tool -change @rpath/libc++.1.dylib /usr/lib/libc++.1.dylib bin/micromamba
- name: Build Application Bundle
run: ${pythonLocation}/bin/python setup.py ${LITE_FLAG} --dist-dir ${DISTDIR}
- name: Add missing Black module to bundle
run: cp -v ${pythonLocation}/lib/python3.9/site-packages/629853fdff261ed89b74__mypyc* ${DISTDIR}/Spyder.app/Contents/Resources/lib/python3.9/
- name: Create Keychain
if: ${{env.IS_RELEASE == 'true' || env.IS_PRE == 'true'}}
run: ./certkeychain.sh "${MACOS_CERTIFICATE}" "${MACOS_CERTIFICATE_PWD}"
Expand Down
2 changes: 1 addition & 1 deletion binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ dependencies:
- pyls-spyder >=0.4.0
- pyqt >=5.10,<5.16
- pyqtwebengine >=5.10,<5.16
- python-lsp-black >=1.2.0,<3.0.0
- python-lsp-black >=2.0.0,<3.0.0
- python-lsp-server >=1.9.0,<1.10.0
- pyxdg >=0.26
- pyzmq >=22.1.0
Expand Down
1 change: 1 addition & 0 deletions installers/macOS/packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@

# Packages that cannot be in the zip folder
PACKAGES = [
'blackd',
'keyring',
'pkg_resources',
'pygments',
Expand Down
2 changes: 1 addition & 1 deletion installers/macOS/req-build.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
dmgbuild>=1.4.2
py2app==0.28.4
sphinx==5.1.1 # See spyder-ide/spyder#19618 for details.
black==22.8.0 # See spyder-ide/spyder#19743 for details.
black==23.12.0 # Pin it to add missing modules to the bundle. See workflow file for the details.
2 changes: 1 addition & 1 deletion requirements/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies:
- pyls-spyder >=0.4.0
- pyqt >=5.10,<5.16
- pyqtwebengine >=5.10,<5.16
- python-lsp-black >=1.2.0,<3.0.0
- python-lsp-black >=2.0.0,<3.0.0
- python-lsp-server >=1.9.0,<1.10.0
- pyzmq >=22.1.0
- qdarkstyle >=3.2.0,<3.3.0
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def run(self):
'pygments>=2.0',
'pylint>=2.5.0,<3.1',
'pylint-venv>=3.0.2',
'python-lsp-black>=1.2.0,<3.0.0',
'python-lsp-black>=2.0.0,<3.0.0',
'pyls-spyder>=0.4.0',
'pyqt5>=5.10,<5.16',
'pyqtwebengine>=5.10,<5.16',
Expand Down
2 changes: 1 addition & 1 deletion spyder/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
PYLINT_REQVER = '>=2.5.0,<3.1'
PYLINT_VENV_REQVER = '>=3.0.2'
PYLSP_REQVER = '>=1.9.0,<1.10.0'
PYLSP_BLACK_REQVER = '>=1.2.0,<3.0.0'
PYLSP_BLACK_REQVER = '>=2.0.0,<3.0.0'
PYLS_SPYDER_REQVER = '>=0.4.0'
PYXDG_REQVER = '>=0.26'
PYZMQ_REQVER = '>=22.1.0'
Expand Down

0 comments on commit 0488c59

Please sign in to comment.