-
-
Notifications
You must be signed in to change notification settings - Fork 584
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2028 from PyCQA/prepare-release-5.11.0
Prepare release 5.11.0
- Loading branch information
Showing
12 changed files
with
241 additions
and
220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
pip==22.3.1 | ||
poetry==1.2.2 | ||
poetry==1.3.1 | ||
virtualenv==20.17.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
#!/bin/bash | ||
set -euxo pipefail | ||
|
||
# TODO: reneable cruft when it takes Python restriction | ||
#poetry run cruft check | ||
poetry run mypy -p isort -p tests | ||
poetry run black --target-version py37 --check . | ||
poetry run isort --profile hug --check --diff isort/ tests/ | ||
poetry run isort --profile hug --check --diff example_*/ | ||
poetry run flake8 isort/ tests/ | ||
poetry run safety check -i 39462 -i 40291 -i 43453 -i 44717 -i 44716 -i 44715 -i 47794 -i 49337 -i 50870 -i 51457 -i 51499 | ||
poetry run safety check -i 47794 -i 51457 | ||
poetry run bandit -r isort/ -x isort/_vendored |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
"""Tests that need installation of other packages.""" | ||
# TODO: find a way to install example-isort-formatting-plugin to pass tests | ||
# import isort.literal | ||
|
||
# from isort.settings import Config | ||
|
||
|
||
# def test_value_assignment_list(): | ||
# assert isort.literal.assignment("x = ['b', 'a']", "list", "py") == "x = ['a', 'b']" | ||
# assert ( | ||
# isort.literal.assignment("x = ['b', 'a']", "list", "py", Config(formatter="example")) | ||
# == 'x = ["a", "b"]' | ||
# ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,188 @@ | ||
"""Tests that need installation of other packages.""" | ||
# TODO: find a way to install example-isort-formatting-plugin to pass tests | ||
# from io import StringIO | ||
|
||
# import pytest | ||
|
||
# import isort | ||
# from isort import api, exceptions | ||
|
||
|
||
# def test_isort_supports_formatting_plugins(): | ||
# """Test to ensure isort provides a way to create and share formatting plugins. | ||
# See: https://github.com/pycqa/isort/issues/1353. | ||
# """ | ||
# # formatting plugin | ||
# assert isort.code("import a", formatter="example") == "import a\n" | ||
# # non-existent plugin | ||
# with pytest.raises(exceptions.FormattingPluginDoesNotExist): | ||
# assert isort.code("import a", formatter="madeupfake") == "import a\n" | ||
|
||
|
||
# def test_isort_literals_issue_1358(): | ||
# assert ( | ||
# isort.code( | ||
# """ | ||
# import x | ||
# import a | ||
|
||
|
||
# # isort: list | ||
# __all__ = ["b", "a", "b"] | ||
|
||
# # isort: unique-list | ||
# __all__ = ["b", "a", "b"] | ||
|
||
# # isort: tuple | ||
# __all__ = ("b", "a", "b") | ||
|
||
# # isort: unique-tuple | ||
# __all__ = ("b", "a", "b") | ||
|
||
# # isort: set | ||
# __all__ = {"b", "a", "b"} | ||
|
||
|
||
# def method(): | ||
# # isort: list | ||
# x = ["b", "a"] | ||
|
||
|
||
# # isort: dict | ||
# y = {"z": "z", "b": "b", "b": "c"}""" | ||
# ) | ||
# == """ | ||
# import a | ||
# import x | ||
|
||
# # isort: list | ||
# __all__ = ['a', 'b', 'b'] | ||
|
||
# # isort: unique-list | ||
# __all__ = ['a', 'b'] | ||
|
||
# # isort: tuple | ||
# __all__ = ('a', 'b', 'b') | ||
|
||
# # isort: unique-tuple | ||
# __all__ = ('a', 'b') | ||
|
||
# # isort: set | ||
# __all__ = {'a', 'b'} | ||
|
||
|
||
# def method(): | ||
# # isort: list | ||
# x = ['a', 'b'] | ||
|
||
|
||
# # isort: dict | ||
# y = {'b': 'c', 'z': 'z'}""" | ||
# ) | ||
# assert ( | ||
# isort.code( | ||
# """ | ||
# import x | ||
# import a | ||
|
||
|
||
# # isort: list | ||
# __all__ = ["b", "a", "b"] | ||
|
||
# # isort: unique-list | ||
# __all__ = ["b", "a", "b"] | ||
|
||
# # isort: tuple | ||
# __all__ = ("b", "a", "b") | ||
|
||
# # isort: unique-tuple | ||
# __all__ = ("b", "a", "b") | ||
|
||
# # isort: set | ||
# __all__ = {"b", "a", "b"} | ||
|
||
|
||
# def method(): | ||
# # isort: list | ||
# x = ["b", "a"] | ||
|
||
|
||
# # isort: assignments | ||
# d = 1 | ||
# b = 2 | ||
# a = 3 | ||
|
||
# # isort: dict | ||
# y = {"z": "z", "b": "b", "b": "c"}""", | ||
# formatter="example", | ||
# ) | ||
# == """ | ||
# import a | ||
# import x | ||
|
||
# # isort: list | ||
# __all__ = ["a", "b", "b"] | ||
|
||
# # isort: unique-list | ||
# __all__ = ["a", "b"] | ||
|
||
# # isort: tuple | ||
# __all__ = ("a", "b", "b") | ||
|
||
# # isort: unique-tuple | ||
# __all__ = ("a", "b") | ||
|
||
# # isort: set | ||
# __all__ = {"a", "b"} | ||
|
||
|
||
# def method(): | ||
# # isort: list | ||
# x = ["a", "b"] | ||
|
||
|
||
# # isort: assignments | ||
# a = 3 | ||
# b = 2 | ||
# d = 1 | ||
|
||
# # isort: dict | ||
# y = {"b": "c", "z": "z"}""" | ||
# ) | ||
# assert api.sort_stream( | ||
# input_stream=StringIO( | ||
# """ | ||
# import a | ||
# import x | ||
|
||
# # isort: list | ||
# __all__ = ["b", "a", "b"] | ||
|
||
# # isort: unique-list | ||
# __all__ = ["b", "a", "b"] | ||
|
||
# # isort: tuple | ||
# __all__ = ("b", "a", "b") | ||
|
||
# # isort: unique-tuple | ||
# __all__ = ("b", "a", "b") | ||
|
||
# # isort: set | ||
# __all__ = {"b", "a", "b"} | ||
|
||
|
||
# def method(): | ||
# # isort: list | ||
# x = ["b", "a"] | ||
|
||
|
||
# # isort: assignments | ||
# d = 1 | ||
# b = 2 | ||
# a = 3 | ||
|
||
# # isort: dict | ||
# y = {"z": "z", "b": "b", "b": "c"}""", | ||
# ), | ||
# output_stream=StringIO(), | ||
# ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.