Is isort: split the only way to prevent re-ordering of modules?
#2454
-
|
I just wanted to confirm that my understanding is correct: I've read the docs and asked AI multiple times, so I think this is right. An aside: isort is in the top five of my favorite programming tools. I can't imagine how many hours of work y'all have saved me since I started using it. A million thanks. In As far as I can tell, there is not a set of commands that I could add to the configuration file that would 1) apply a different rule to One of my `__init__.py` files as an example
"""Developing elimination-based algorithms."""
# isort: split
from mapFolding._e._semiotics import (
dimensionIndex as dimensionIndex, leafOrigin as leafOrigin, pileOrigin as pileOrigin, 一 as 一, 七 as 七, 三 as 三, 九 as 九,
二 as 二, 五 as 五, 八 as 八, 六 as 六, 四 as 四, 零 as 零, 首一 as 首一, 首一三 as 首一三, 首一二 as 首一二, 首一二三 as 首一二三, 首三 as 首三, 首二 as 首二,
首二三 as 首二三, 首零 as 首零, 首零一 as 首零一, 首零一三 as 首零一三, 首零一二 as 首零一二, 首零一二三 as 首零一二三, 首零三 as 首零三, 首零二 as 首零二, 首零二三 as 首零二三)
# isort: split
from mapFolding._e._theTypes import (
Folding as Folding, Leaf as Leaf, LeafOrPileRangeOfLeaves as LeafOrPileRangeOfLeaves,
PermutationSpace as PermutationSpace, Pile as Pile, PileRangeOfLeaves as PileRangeOfLeaves,
PilesWithPileRangeOfLeaves as PilesWithPileRangeOfLeaves, PinnedLeaves as PinnedLeaves)
# isort: split
from mapFolding._e._beDRY import (
between as between, consecutive as consecutive, DOTgetPileIfLeaf as DOTgetPileIfLeaf,
DOTgetPileIfPileRangeOfLeaves as DOTgetPileIfPileRangeOfLeaves, DOTitems as DOTitems, DOTkeys as DOTkeys,
DOTvalues as DOTvalues, exclude as exclude, getAntiPileRangeOfLeaves as getAntiPileRangeOfLeaves,
getIteratorOfLeaves as getIteratorOfLeaves, getPileRangeOfLeaves as getPileRangeOfLeaves,
getProductsOfDimensions as getProductsOfDimensions, getSumsOfProductsOfDimensions as getSumsOfProductsOfDimensions,
getSumsOfProductsOfDimensionsNearest首 as getSumsOfProductsOfDimensionsNearest首, hasDuplicates as hasDuplicates,
leafIsInPileRange as leafIsInPileRange, leafIsNotPinned as leafIsNotPinned, leafIsPinned as leafIsPinned,
mappingHasKey as mappingHasKey, mapShapeIs2上nDimensions as mapShapeIs2上nDimensions,
notLeafOriginOrLeaf零 as notLeafOriginOrLeaf零, notPileLast as notPileLast, oopsAllLeaves as oopsAllLeaves,
oopsAllPileRangesOfLeaves as oopsAllPileRangesOfLeaves, pileIsNotOpen as pileIsNotOpen, pileIsOpen as pileIsOpen,
pileRangeOfLeavesAND as pileRangeOfLeavesAND, reverseLookup as reverseLookup, thisHasThat as thisHasThat,
thisIsALeaf as thisIsALeaf, thisIsAPileRangeOfLeaves as thisIsAPileRangeOfLeaves,
Z0Z_getIndicesSameDimensionLength as Z0Z_getIndicesSameDimensionLength, Z0Z_invert as Z0Z_invert,
Z0Z_JeanValjean as Z0Z_JeanValjean)
# isort: split
from mapFolding._e._measure import (
dimensionFourthNearest首 as dimensionFourthNearest首, dimensionNearestTail as dimensionNearestTail,
dimensionNearest首 as dimensionNearest首, dimensionSecondNearest首 as dimensionSecondNearest首,
dimensionThirdNearest首 as dimensionThirdNearest首, howManyDimensionsHaveOddParity as howManyDimensionsHaveOddParity,
leafInSubHyperplane as leafInSubHyperplane, ptount as ptount, Z0Z_0NearestTail as Z0Z_0NearestTail)
# isort: split
from mapFolding._e._dataDynamic import (
addPileRangesOfLeaves as addPileRangesOfLeaves,
getDictionaryConditionalLeafPredecessors as getDictionaryConditionalLeafPredecessors,
getDictionaryLeafDomains as getDictionaryLeafDomains, getDictionaryPileRanges as getDictionaryPileRanges,
getDomainDimension一 as getDomainDimension一, getDomainDimension二 as getDomainDimension二,
getDomainDimension首二 as getDomainDimension首二, getDomain二一零and二一 as getDomain二一零and二一,
getDomain二零and二 as getDomain二零and二, getDomain首零一二and首一二 as getDomain首零一二and首一二, getDomain首零二and首二 as getDomain首零二and首二,
getLeafDomain as getLeafDomain, getLeaf首零Plus零Domain as getLeaf首零Plus零Domain,
getLeavesCreaseBack as getLeavesCreaseBack, getLeavesCreaseNext as getLeavesCreaseNext, getPileRange as getPileRange,
getZ0Z_successor as getZ0Z_successor)
from mapFolding._e.pin2上nDimensionsAnnex import leafParityInDimension as leafParityInDimensionMy configuration file
[settings]
combine_as_imports = true
force_alphabetical_sort_within_sections = true
from_first = true
honor_noqa = true
indent = ' '
line_length = 120
lines_after_imports = 1
lines_between_types = 0
multi_line_output = 4
no_sections = true
overwrite_in_place = true
use_parentheses = true |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Hey! I don't fully understand the ask here: I think you have figured out a configuration that works. Are you looking for confirmation that this is behaving as expected? |
Beta Was this translation helpful? Give feedback.
I don't believe we have such an option, I think what you have come up with is (unfortunately) the best we can do 😅