Skip to content

Commit 37437ee

Browse files
committed
Drop support for Python 3.7
Also, drop some tests for Python 3.6
1 parent 27200ee commit 37437ee

File tree

6 files changed

+3
-25
lines changed

6 files changed

+3
-25
lines changed

.github/workflows/python.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
python-version: [3.8, 3.9, "3.10", "3.11"]
14+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
1515
steps:
1616
- uses: actions/checkout@v2
1717
- name: Set up Python ${{ matrix.python-version }}

pylsp_black/plugin.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -184,14 +184,6 @@ def _load_config(filename: str, client_config: Config) -> Dict:
184184
target_version = set(
185185
black.TargetVersion[x.upper()] for x in file_config["target_version"]
186186
)
187-
elif file_config.get("py36"):
188-
target_version = {
189-
black.TargetVersion.PY36,
190-
black.TargetVersion.PY37,
191-
black.TargetVersion.PY38,
192-
black.TargetVersion.PY39,
193-
black.TargetVersion.PY310,
194-
}
195187
else:
196188
target_version = set()
197189

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tool.black]
2-
target-version = ['py36', 'py37', 'py38', 'py39', 'py310']
2+
target-version = ['py38', 'py39', 'py310', 'py311', 'py312']
33
exclude = '''
44
/(
55
\.venv

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ install_requires =
2222
python-lsp-server>=1.4.0
2323
black>=22.3.0
2424
tomli; python_version<'3.11'
25-
python_requires = >= 3.7
25+
python_requires = >= 3.8
2626

2727
[options.entry_points]
2828
pylsp = pylsp_black = pylsp_black.plugin

tests/fixtures/py36/pyproject.toml

Lines changed: 0 additions & 2 deletions
This file was deleted.

tests/test_plugin.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -262,18 +262,6 @@ def test_load_config_target_version(config):
262262
assert config["target_version"] == {black.TargetVersion.PY39}
263263

264264

265-
def test_load_config_py36(config):
266-
config = load_config(str(fixtures_dir / "py36" / "example.py"), config)
267-
268-
assert config["target_version"] == {
269-
black.TargetVersion.PY36,
270-
black.TargetVersion.PY37,
271-
black.TargetVersion.PY38,
272-
black.TargetVersion.PY39,
273-
black.TargetVersion.PY310,
274-
}
275-
276-
277265
def test_load_config_defaults(config):
278266
config = load_config(str(fixtures_dir / "example.py"), config)
279267

0 commit comments

Comments
 (0)