Skip to content

Commit fb19109

Browse files
committed
Modernize multiline import syntax; fix some more flake8 warnings
1 parent db12ea9 commit fb19109

File tree

3 files changed

+41
-41
lines changed

3 files changed

+41
-41
lines changed

unpythonic/__init__.py

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,38 +8,38 @@
88

99
__version__ = '0.14.3'
1010

11-
from .amb import *
12-
from .arity import *
13-
from .assignonce import *
14-
from .collections import *
15-
from .conditions import *
16-
from .dispatch import *
17-
from .dynassign import *
18-
from .ec import *
19-
from .fix import *
20-
from .fold import *
21-
from .fploop import *
22-
from .fun import *
23-
from .fup import *
24-
from .gmemo import *
25-
from .gtco import *
26-
from .it import *
27-
from .let import * # no guarantees on evaluation order (before Python 3.6), nice syntax
11+
from .amb import * # noqa: F401, F403
12+
from .arity import * # noqa: F401, F403
13+
from .assignonce import * # noqa: F401, F403
14+
from .collections import * # noqa: F401, F403
15+
from .conditions import * # noqa: F401, F403
16+
from .dispatch import * # noqa: F401, F403
17+
from .dynassign import * # noqa: F401, F403
18+
from .ec import * # noqa: F401, F403
19+
from .fix import * # noqa: F401, F403
20+
from .fold import * # noqa: F401, F403
21+
from .fploop import * # noqa: F401, F403
22+
from .fun import * # noqa: F401, F403
23+
from .fup import * # noqa: F401, F403
24+
from .gmemo import * # noqa: F401, F403
25+
from .gtco import * # noqa: F401, F403
26+
from .it import * # noqa: F401, F403
27+
from .let import * # no guarantees on evaluation order (before Python 3.6), nice syntax # noqa: F401, F403
2828

2929
# guaranteed evaluation order, clunky syntax
30-
from .lispylet import let as ordered_let, letrec as ordered_letrec, \
31-
dlet as ordered_dlet, dletrec as ordered_dletrec, \
32-
blet as ordered_blet, bletrec as ordered_bletrec
30+
from .lispylet import (let as ordered_let, letrec as ordered_letrec, # noqa: F401
31+
dlet as ordered_dlet, dletrec as ordered_dletrec,
32+
blet as ordered_blet, bletrec as ordered_bletrec)
3333

34-
from .llist import *
35-
from .mathseq import *
36-
from .misc import *
37-
from .seq import *
38-
from .singleton import *
39-
from .slicing import *
40-
from .symbol import *
41-
from .tco import *
42-
from .typecheck import *
34+
from .llist import * # noqa: F401, F403
35+
from .mathseq import * # noqa: F401, F403
36+
from .misc import * # noqa: F401, F403
37+
from .seq import * # noqa: F401, F403
38+
from .singleton import * # noqa: F401, F403
39+
from .slicing import * # noqa: F401, F403
40+
from .symbol import * # noqa: F401, F403
41+
from .tco import * # noqa: F401, F403
42+
from .typecheck import * # noqa: F401, F403
4343

4444
# HACK: break dependency loop
4545
from .lazyutil import _init_module

unpythonic/collections.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
from itertools import repeat
1212
from abc import abstractmethod
1313
from collections import abc
14-
from collections.abc import Container, Iterable, Hashable, Sized, \
15-
Sequence, Mapping, Set, \
16-
MutableSequence, MutableMapping, MutableSet, \
17-
MappingView
14+
from collections.abc import (Container, Iterable, Hashable, Sized,
15+
Sequence, Mapping, Set,
16+
MutableSequence, MutableMapping, MutableSet,
17+
MappingView)
1818
from inspect import isclass
1919
from operator import lt, le, ge, gt
2020
import threading

unpythonic/mathseq.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,14 @@
2828

2929
from itertools import repeat, takewhile, count
3030
from functools import wraps
31-
from operator import add as primitive_add, mul as primitive_mul, \
32-
pow as primitive_pow, mod as primitive_mod, \
33-
floordiv as primitive_floordiv, truediv as primitive_truediv, \
34-
sub as primitive_sub, \
35-
neg as primitive_neg, pos as primitive_pos, \
36-
and_ as primitive_and, xor as primitive_xor, or_ as primitive_or, \
37-
lshift as primitive_lshift, rshift as primitive_rshift, \
38-
invert as primitive_invert
31+
from operator import (add as primitive_add, mul as primitive_mul,
32+
pow as primitive_pow, mod as primitive_mod,
33+
floordiv as primitive_floordiv, truediv as primitive_truediv,
34+
sub as primitive_sub,
35+
neg as primitive_neg, pos as primitive_pos,
36+
and_ as primitive_and, xor as primitive_xor, or_ as primitive_or,
37+
lshift as primitive_lshift, rshift as primitive_rshift,
38+
invert as primitive_invert)
3939

4040
from .it import take, rev
4141
from .gmemo import imemoize, gmemoize

0 commit comments

Comments
 (0)