diff --git a/.github/workflows/python.yaml b/.github/workflows/python.yaml index 6bcf2807..e7a9fc42 100644 --- a/.github/workflows/python.yaml +++ b/.github/workflows/python.yaml @@ -16,7 +16,7 @@ jobs: # ubuntu-latest is being moved from ubuntu-18.04 to ubuntu-20.04 # See https://github.com/actions/virtual-environments/issues/1816 os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ["3.7", "3.8", "3.9", "3.10"] + python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] runs-on: ${{ matrix.os }} env: PYTHONUNBUFFERED: 1 diff --git a/README.rst b/README.rst index 52eb1115..1dd3848f 100644 --- a/README.rst +++ b/README.rst @@ -251,6 +251,8 @@ python - Description * - `py://nitpick/resources/python/310 `_ - Python 3.10 + * - `py://nitpick/resources/python/311 `_ + - Python 3.11 * - `py://nitpick/resources/python/37 `_ - Python 3.7 * - `py://nitpick/resources/python/38 `_ diff --git a/docs/ideas/yaml/contains.toml b/docs/ideas/yaml/contains.toml index eb1a5546..5ca5e19d 100644 --- a/docs/ideas/yaml/contains.toml +++ b/docs/ideas/yaml/contains.toml @@ -3,7 +3,7 @@ [[".github/workflows/python.yaml".contains]] __jmespath = "jobs.build.strategy.matrix" os = ["ubuntu-latest", "macos-latest", "windows-latest"] -"python-version" = ["3.7", "3.8", "3.9", "3.10"] +"python-version" = ["3.7", "3.8", "3.9", "3.10", "3.11"] # 3. Same as item 4 on "jmespath-on-section.toml", but with a different syntax. [[".github/workflows/python.yaml".contains]] @@ -56,7 +56,7 @@ __yaml = "- uses: actions/checkout@v2" [[".github/workflows/python.yaml".contains_sorted]] __jmespath = "jobs.build.strategy.matrix" os = ["ubuntu-latest", "macos-latest", "windows-latest"] -"python-version" = ["3.7", "3.8", "3.9", "3.10"] +"python-version" = ["3.7", "3.8", "3.9", "3.10", "3.11"] [[".github/workflows/python.yaml".contains_sorted]] __jmespath = "jobs.build" diff --git a/docs/ideas/yaml/merge_lists/merged_style.toml b/docs/ideas/yaml/merge_lists/merged_style.toml index a45b54e6..f326a247 100644 --- a/docs/ideas/yaml/merge_lists/merged_style.toml +++ b/docs/ideas/yaml/merge_lists/merged_style.toml @@ -1,4 +1,4 @@ # This should be the result of a parent style including all the styles in this directory [".github/workflows/python.yaml".jobs.build.strategy.matrix] os = ["ubuntu-latest", "macos-latest", "windows-latest"] -"python-version" = ["3.7", "3.8", "3.9", "3.10"] +"python-version" = ["3.7", "3.8", "3.9", "3.10", "3.11"] diff --git a/docs/ideas/yaml/merge_lists/py311.toml b/docs/ideas/yaml/merge_lists/py311.toml new file mode 100644 index 00000000..4e0af26c --- /dev/null +++ b/docs/ideas/yaml/merge_lists/py311.toml @@ -0,0 +1,2 @@ +[".github/workflows/python.yaml".jobs.build.strategy.matrix] +"python-version" = ["3.11"] diff --git a/docs/library.rst b/docs/library.rst index b659c6c1..672bf9e2 100644 --- a/docs/library.rst +++ b/docs/library.rst @@ -92,6 +92,8 @@ python - Description * - :gitref:`py://nitpick/resources/python/310 ` - Python 3.10 + * - :gitref:`py://nitpick/resources/python/311 ` + - Python 3.11 * - :gitref:`py://nitpick/resources/python/37 ` - Python 3.7 * - :gitref:`py://nitpick/resources/python/38 ` diff --git a/src/nitpick/resources/python/311.toml b/src/nitpick/resources/python/311.toml new file mode 100644 index 00000000..2913ef3b --- /dev/null +++ b/src/nitpick/resources/python/311.toml @@ -0,0 +1,5 @@ +[nitpick.meta] +name = "Python 3.11" + +["pyproject.toml".tool.poetry.dependencies] +python = "^3.11" diff --git a/src/nitpick/resources/python/github-workflow.toml b/src/nitpick/resources/python/github-workflow.toml index aaa52d9f..388aecb4 100644 --- a/src/nitpick/resources/python/github-workflow.toml +++ b/src/nitpick/resources/python/github-workflow.toml @@ -11,7 +11,7 @@ fail-fast = false [".github/workflows/python.yaml".jobs.build.strategy.matrix] os = ["ubuntu-latest", "windows-latest", "macos-latest"] -python-version = ["3.7", "3.8", "3.9", "3.10"] +python-version = ["3.7", "3.8", "3.9", "3.10", "3.11"] [".github/workflows/python.yaml".jobs.build] name = "${{ matrix.python-version }} ${{ matrix.os }}" diff --git a/tests/test_builtin/python/311/pyproject.toml b/tests/test_builtin/python/311/pyproject.toml new file mode 100644 index 00000000..5097df06 --- /dev/null +++ b/tests/test_builtin/python/311/pyproject.toml @@ -0,0 +1,2 @@ +[tool.poetry.dependencies] +python = "^3.11" diff --git a/tests/test_builtin/python/github-workflow/.github/workflows/python.yaml b/tests/test_builtin/python/github-workflow/.github/workflows/python.yaml index 33539e78..3c3b822a 100644 --- a/tests/test_builtin/python/github-workflow/.github/workflows/python.yaml +++ b/tests/test_builtin/python/github-workflow/.github/workflows/python.yaml @@ -15,6 +15,7 @@ jobs: - '3.8' - '3.9' - '3.10' + - '3.11' name: ${{ matrix.python-version }} ${{ matrix.os }} runs-on: ${{ matrix.os }} env: diff --git a/tests/test_yaml/new-desired.toml b/tests/test_yaml/new-desired.toml index 464e9d92..bdd07975 100644 --- a/tests/test_yaml/new-desired.toml +++ b/tests/test_yaml/new-desired.toml @@ -12,7 +12,7 @@ with = {"python-version" = "${{ matrix.python-version }}"} [".github/workflows/python.yaml".jobs.build.strategy.matrix] os = ["ubuntu-latest", "macos-latest", "windows-latest"] -"python-version" = ["3.7", "3.8", "3.9", "3.10"] +"python-version" = ["3.7", "3.8", "3.9", "3.10", "3.11"] [".github/workflows/python.yaml".jobs.build] "runs-on" = "${{ matrix.os }}" diff --git a/tests/test_yaml/new-expected.yaml b/tests/test_yaml/new-expected.yaml index 8bac87f9..b2d34245 100644 --- a/tests/test_yaml/new-expected.yaml +++ b/tests/test_yaml/new-expected.yaml @@ -17,4 +17,5 @@ jobs: - '3.8' - '3.9' - '3.10' + - '3.11' runs-on: ${{ matrix.os }}