Skip to content

Conversation

@MarcoGorelli
Copy link
Member

@MarcoGorelli MarcoGorelli commented Feb 12, 2021

  • Ensure all linting tests pass, see here for how to run them

As discussed in the monthly dev meeting - motivation here is to reduce the number of merge conflicts, which single-line imports seem to be a major source of.

some examples of such conflicts (which force_grid_wrap would avoid):

#37467 :

<<<<<<< GH37278
from typing import TYPE_CHECKING, Optional
=======
from __future__ import annotations

from typing import TYPE_CHECKING
>>>>>>> master

#34426 :

<<<<<<< 8745-from_dummies
from typing import TYPE_CHECKING, Any, Dict, Hashable, List, Optional, Type, Union, cast
=======
from typing import (
    TYPE_CHECKING,
    Dict,
    Hashable,
    List,
    Optional,
    Sequence,
    Type,
    TypeVar,
    Union,
    cast,
)
>>>>>>> master

#29944 :

<<<<<<< subplot_groups
from collections import Counter, Iterable
from typing import TYPE_CHECKING, Hashable, List, Optional, Sequence, Tuple, Union
=======
from __future__ import annotations

from typing import TYPE_CHECKING, Hashable, List, Optional, Tuple
>>>>>>> master

This changes a huge number of files in one go, but all I've done is

git reset --hard upstream/master
# add `force_grid_wrap` option to setup.cfg
pre-commit run isort -a
git commit -m 'force grid-wrap' -a

@MarcoGorelli MarcoGorelli changed the title STYLE use force grid-wrap in isort STYLE use force-grid-wrap in isort Feb 12, 2021
@jreback jreback added the Code Style Code style, linting, code_checks label Feb 12, 2021
@MarcoGorelli MarcoGorelli requested a review from jreback February 13, 2021 10:22
@jreback jreback added this to the 1.3 milestone Feb 15, 2021
@jreback
Copy link
Contributor

jreback commented Feb 15, 2021

i think this is fine. please merge master and ping when green so can merge.

@jreback jreback merged commit d01561f into pandas-dev:master Feb 16, 2021
@jreback
Copy link
Contributor

jreback commented Feb 16, 2021

thanks @MarcoGorelli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Code Style Code style, linting, code_checks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants