Skip to content

Commit

Permalink
Merge branch 'main' into fix-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielNoord authored Jan 21, 2025
2 parents 8a61d1e + 878824b commit 20425ce
Show file tree
Hide file tree
Showing 89 changed files with 2,333 additions and 1,863 deletions.
20 changes: 0 additions & 20 deletions .coveragerc

This file was deleted.

8 changes: 4 additions & 4 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[flake8]
max-line-length = 100
# Ignore non PEP 8 compliant rules as suggested by black
# E203: https://github.com/psf/black/blob/3fab5ade71bccf80ae0a5af76729099869adea56/docs/the_black_code_style/current_style.md#slices
extend-ignore =
E203, # https://github.com/psf/black/blob/master/docs/the_black_code_style.md#slices
E501
E203,
E501,
B017
exclude = _vendored
per-file-ignores =
isort/__init__.py:F401
isort/stdlibs/__init__.py:F401
tests/unit/example_crlf_file.py:F401
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
groups:
github-actions:
patterns:
- "*"
2 changes: 1 addition & 1 deletion .github/workflows/constraints.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pip==22.3.1
pip==23.2
virtualenv==20.17.1
15 changes: 4 additions & 11 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,16 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
python-version: ["3.12"]

steps:
- uses: actions/checkout@v2

- name: pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: integration-pip-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
integration-pip-
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"

- name: Upgrade pip
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Run Labeler
uses: crazy-max/ghaction-github-labeler@v4
uses: crazy-max/ghaction-github-labeler@v5
with:
skip-delete: true
15 changes: 4 additions & 11 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,16 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]
python-version: ["3.12"]

steps:
- uses: actions/checkout@v2

- name: pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: lint-pip-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
lint-pip-
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"

- name: Upgrade pip
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/poetry-constraints.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
poetry==1.3.1
poetry==2.0.1
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
if: github.repository_owner == 'PyCQA'
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
- uses: release-drafter/release-drafter@v6
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 2

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"

- name: Upgrade pip
run: |
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
password: ${{ secrets.PYPI_API_TOKEN }}

- name: Publish the release notes
uses: release-drafter/release-drafter@v5
uses: release-drafter/release-drafter@v6
with:
publish: ${{ steps.check-version.outputs.tag != '' }}
tag: ${{ steps.check-version.outputs.tag }}
Expand Down
45 changes: 10 additions & 35 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,58 +1,33 @@
---
name: Test

"on":
on:
push:
pull_request:

permissions:
contents: read

env:
FORCE_COLOR: 1

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v2
- name: Ubuntu cache
uses: actions/cache@v2
if: startsWith(matrix.os, 'ubuntu')
with:
path: ~/.cache/pip
key:
${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ matrix.os }}-${{ matrix.python-version }}-
- name: macOS cache
uses: actions/cache@v2
if: startsWith(matrix.os, 'macOS')
with:
path: ~/Library/Caches/pip
key:
${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ matrix.os }}-${{ matrix.python-version }}-
- name: Windows cache
uses: actions/cache@v2
if: startsWith(matrix.os, 'windows')
with:
path: c:\users\runneradmin\appdata\local\pip\cache
key:
${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ matrix.os }}-${{ matrix.python-version }}-
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: "pip"

- name: Upgrade pip
run: |
Expand All @@ -61,7 +36,7 @@ jobs:
- name: Install Poetry
run: |
pipx install --pip-args=--constraint=.github/workflows/poetry-constraints.txt poetry
pip install --constraint=.github/workflows/poetry-constraints.txt poetry
poetry --version
- name: Install dependencies
Expand All @@ -73,4 +48,4 @@ jobs:

- name: Report Coverage
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
uses: codecov/codecov-action@v1
uses: codecov/codecov-action@v5
5 changes: 0 additions & 5 deletions .isort.cfg

This file was deleted.

2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
repos:
- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
3 changes: 2 additions & 1 deletion .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
- id: isort
name: isort
entry: isort
stages: [pre-commit, pre-merge-commit, pre-push, manual]
require_serial: true
language: python
types_or: [cython, pyi, python]
args: ['--filter-files']
minimum_pre_commit_version: '2.9.2'
minimum_pre_commit_version: '3.2.0'
37 changes: 36 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,43 @@ Changelog
NOTE: isort follows the [semver](https://semver.org/) versioning standard.
Find out more about isort's release policy [here](https://pycqa.github.io/isort/docs/major_releases/release_policy).

### 5.12.1 [in progress]
### 5.13.2 December 13 2023

- Apply the bracket fix from issue #471 only for use_parentheses=True (#2184) @bp72
- Confine pre-commit to stages (#2213) @davidculley
- Fixed colors extras (#2212) @staticdev

### 5.13.1 December 11 2023

- Fixed integration tests (#2208) @bp72
- Fixed normalizing imports from more than one level of parent modules (issue/2152) (#2191) @bp72
- Remove optional dependencies without extras (#2207) @staticdev

### 5.13.0 December 9 2023

- Cleanup deprecated extras (#2089) @staticdev
- Fixed #1989: settings lookup when working in stream based mode
- Fixed 80 line length for wemake linter (#2183) @skatromb
- Add support for Python 3.12 (#2175) @hugovk
- Fixed: add newest version to pre-commit docs (#2190) @AzulGarza
- Fixed assertions in test_git_hook (#2196) @mgorny
- Removed check for include_trailing_comma for the Hanging Indent wrap mode (#2192) @bp72
- Use the standard library tomllib on sufficiently new python (#2202) @eli-schwartz
- Update pre-commit.md version number (#2197) @nicobako
- doc: Update black_compatibility.md (#2177) @JSS95
- Fixed safety sept 2023 (#2178) @staticdev
- docs: fix black profile documentation (#2163) @nijel
- Fixed typo: indended -> indented (#2161) @vadimkerr
- Docs(configuration/options.md): fix missing trailing spaces for hard linebreak (#2157) @JoeyTeng
- Update pre-commit.md (#2148) @godiard
- chore: move configurations to pyproject.toml (#2115) @SauravMaheshkar
- Fixed typo in README (#2112) @stefmolin
- Update version in pre-commit setup to avoid installation issue with poetry (#2103) @stefmolin
- Skip .pytype directory by default. (#2098) @manueljacob
- Fixed a tip block styling in the Config Files section (#2097) @Klavionik
- Do not cache configuration files (#1995) @kaste
- Derive settings_path from --filename (#1992) @kaste
- Fixed year of version 5.12.0 in CHANGELOG.md (#2082) @DjLegolas

### 5.12.0 January 28 2023

Expand Down
28 changes: 5 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
------------------------------------------------------------------------

[![PyPI version](https://badge.fury.io/py/isort.svg)](https://badge.fury.io/py/isort)
[![Test Status](https://github.com/pycqa/isort/workflows/Test/badge.svg?branch=develop)](https://github.com/pycqa/isort/actions?query=workflow%3ATest)
[![Lint Status](https://github.com/pycqa/isort/workflows/Lint/badge.svg?branch=develop)](https://github.com/pycqa/isort/actions?query=workflow%3ALint)
[![Test](https://github.com/PyCQA/isort/actions/workflows/test.yml/badge.svg)](https://github.com/PyCQA/isort/actions/workflows/test.yml)
[![Lint](https://github.com/PyCQA/isort/actions/workflows/lint.yml/badge.svg)](https://github.com/PyCQA/isort/actions/workflows/lint.yml)
[![Code coverage Status](https://codecov.io/gh/pycqa/isort/branch/main/graph/badge.svg)](https://codecov.io/gh/pycqa/isort)
[![License](https://img.shields.io/github/license/mashape/apistatus.svg)](https://pypi.org/project/isort/)
[![Join the chat at https://gitter.im/timothycrosley/isort](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/timothycrosley/isort?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
Expand All @@ -19,11 +19,11 @@ _________________

isort your imports, so you don't have to.

isort is a Python utility / library to sort imports alphabetically, and
automatically separated into sections and by type. It provides a command line
isort is a Python utility / library to sort imports alphabetically and
automatically separate into sections and by type. It provides a command line
utility, Python library and [plugins for various
editors](https://github.com/pycqa/isort/wiki/isort-Plugins) to
quickly sort all your imports. It requires Python 3.8+ to run but
quickly sort all your imports. It requires Python 3.9+ to run but
supports formatting Python 2 code too.

- [Try isort now from your browser!](https://pycqa.github.io/isort/docs/quick_start/0.-try.html)
Expand Down Expand Up @@ -82,24 +82,6 @@ Installing isort is as simple as:
pip install isort
```

Install isort with requirements.txt support:

```bash
pip install isort[requirements_deprecated_finder]
```

Install isort with Pipfile support:

```bash
pip install isort[pipfile_deprecated_finder]
```

Install isort with both formats support:

```bash
pip install isort[requirements_deprecated_finder,pipfile_deprecated_finder]
```

## Using isort

**From the command line**:
Expand Down
5 changes: 2 additions & 3 deletions docs/configuration/black_compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ language: python
python:
- "3.10"
- "3.9"
- "3.8"

install:
- pip install -r requirements-dev.txt
Expand All @@ -56,8 +55,8 @@ See [built-in profiles](https://pycqa.github.io/isort/docs/configuration/profile
You can also set the profile directly when integrating isort within pre-commit.

```yaml
- repo: https://github.com/pycqa/isort
rev: 5.6.4
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration/config_files.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,4 @@ directory_root
isort will sort `subdir1/file1` according to the configurations defined in `subdir1/.isort.cfg`, `subdir2/file2` with configurations from `subdir2/pyproject.toml` and `subdir3/file3.py` based on the `setup.cfg` settings.

!!! tip
You can always confirm exactly what config file was used for a file by running isort with the `--verbose` flag.
You can always confirm exactly what config file was used for a file by running isort with the `--verbose` flag.
Loading

0 comments on commit 20425ce

Please sign in to comment.