diff --git a/pytools/__init__.py b/pytools/__init__.py index 8ebcb633456d8aac95613aed809681f3e1ed822f..89baa9fc218b31d2dd9c7f6c7910e8171e1280a2 100644 --- a/pytools/__init__.py +++ b/pytools/__init__.py @@ -35,8 +35,9 @@ import re import sys from functools import reduce, wraps from sys import intern -from typing import (Any, Callable, ClassVar, Dict, Generic, Hashable, Iterable, - List, Optional, Set, Tuple, TypeVar, Union) +from typing import ( + Any, Callable, ClassVar, Dict, Generic, Hashable, Iterable, List, Optional, Set, + Tuple, TypeVar, Union) try: diff --git a/pytools/graph.py b/pytools/graph.py index 7b0f3423e032e1bb3075d7788205018b8040f17e..054c54449fe7fc330a78100d64bc6c33402c7f12 100644 --- a/pytools/graph.py +++ b/pytools/graph.py @@ -64,8 +64,9 @@ Type Variables Used is included as a key in the graph. """ -from typing import (Any, Callable, Collection, Dict, Hashable, Iterator, List, - Mapping, MutableSet, Optional, Set, Tuple, TypeVar) +from typing import ( + Any, Callable, Collection, Dict, Hashable, Iterator, List, Mapping, MutableSet, + Optional, Set, Tuple, TypeVar) try: diff --git a/pytools/py_codegen.py b/pytools/py_codegen.py index 6d2b25976dcf798c98f58d0b79ba03e0bd2a3c11..4e08239767b4cffc14fb4c4b105611c0cd3f25f5 100644 --- a/pytools/py_codegen.py +++ b/pytools/py_codegen.py @@ -24,8 +24,8 @@ import marshal from importlib.util import MAGIC_NUMBER as BYTECODE_VERSION from types import FunctionType, ModuleType -from pytools.codegen import CodeGenerator as CodeGeneratorBase -from pytools.codegen import Indentation, remove_common_indentation # noqa +from pytools.codegen import ( # noqa + CodeGenerator as CodeGeneratorBase, Indentation, remove_common_indentation) class PythonCodeGenerator(CodeGeneratorBase): diff --git a/pytools/tag.py b/pytools/tag.py index 7359082f2a75ceb90db4e0f730b15bf5bcd91eda..d15131ff35fcadb9061c0eb8e397bc699f42983b 100644 --- a/pytools/tag.py +++ b/pytools/tag.py @@ -30,8 +30,8 @@ Internal stuff that is only here because the documentation tool wants it import sys from dataclasses import dataclass -from typing import (Any, FrozenSet, Iterable, Set, Tuple, Type, # noqa: F401 - TypeVar, Union) +from typing import ( # noqa: F401 + Any, FrozenSet, Iterable, Set, Tuple, Type, TypeVar, Union) from pytools import memoize, memoize_method diff --git a/setup.cfg b/setup.cfg index 299be3d5a88ff2c12d75799eb952eeacdec09130..80d9d12cd6815ead32048e9d00889ee07b584420 100644 --- a/setup.cfg +++ b/setup.cfg @@ -10,7 +10,10 @@ multiline-quotes = """ # enable-isort [isort] +line_length = 85 lines_after_imports = 2 +combine_as_imports = True +multi_line_output = 4 [wheel] universal = 1 diff --git a/test/test_persistent_dict.py b/test/test_persistent_dict.py index 66b1d567ec988c590855e1a427ca8787c9642ca5..a64b71833379b5fe4d4593a98966fddde50564fc 100644 --- a/test/test_persistent_dict.py +++ b/test/test_persistent_dict.py @@ -6,9 +6,9 @@ from enum import Enum, IntEnum import pytest -from pytools.persistent_dict import (CollisionWarning, NoSuchEntryError, - PersistentDict, ReadOnlyEntryError, - WriteOncePersistentDict) +from pytools.persistent_dict import ( + CollisionWarning, NoSuchEntryError, PersistentDict, ReadOnlyEntryError, + WriteOncePersistentDict) from pytools.tag import Tag, tag_dataclass diff --git a/test/test_pytools.py b/test/test_pytools.py index 9ec0dff98908c9692b4bb374a00921e2cc72814c..8398589bfdf32f1e7ea237c190d8dfcb12dde75b 100644 --- a/test/test_pytools.py +++ b/test/test_pytools.py @@ -494,8 +494,8 @@ def test_obj_array_vectorize(c=1): def test_tag(): - from pytools.tag import (NonUniqueTagError, Tag, Taggable, UniqueTag, - check_tag_uniqueness) + from pytools.tag import ( + NonUniqueTagError, Tag, Taggable, UniqueTag, check_tag_uniqueness) # Need a subclass that defines the copy function in order to test. class TaggableWithCopy(Taggable):