Skip to content

Commit

Permalink
Increase isort line length to 99
Browse files Browse the repository at this point in the history
  • Loading branch information
dosisod committed Dec 6, 2023
1 parent a14c469 commit e76e8d5
Show file tree
Hide file tree
Showing 19 changed files with 19 additions and 140 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ refurb:
refurb refurb test/*.py

test/%.txt: test/%.py
refurb "$^" --enable-all --quiet > "$@" || true
refurb "$^" --enable-all --quiet --no-color > "$@" || true

update-tests: $(patsubst %.py,%.txt,$(wildcard test/data*/*.py))

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ pytest = "^7.1.2"
refurb = "refurb.__main__:main"

[tool.isort]
line_length = 99
multi_line_output = 3
include_trailing_comma = true
color_output = true
Expand Down
6 changes: 1 addition & 5 deletions refurb/checks/builtin/no_ignored_dict_items.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@
Var,
)

from refurb.checks.common import (
check_for_loop_like,
is_name_unused_in_contexts,
is_placeholder,
)
from refurb.checks.common import check_for_loop_like, is_name_unused_in_contexts, is_placeholder
from refurb.error import Error


Expand Down
6 changes: 1 addition & 5 deletions refurb/checks/builtin/no_ignored_enumerate.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@
Var,
)

from refurb.checks.common import (
check_for_loop_like,
is_name_unused_in_contexts,
is_placeholder,
)
from refurb.checks.common import check_for_loop_like, is_name_unused_in_contexts, is_placeholder
from refurb.error import Error


Expand Down
10 changes: 1 addition & 9 deletions refurb/checks/builtin/no_set_for_loop.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
from dataclasses import dataclass

from mypy.nodes import (
Block,
CallExpr,
ExpressionStmt,
ForStmt,
MemberExpr,
NameExpr,
Var,
)
from mypy.nodes import Block, CallExpr, ExpressionStmt, ForStmt, MemberExpr, NameExpr, Var

from refurb.checks.common import unmangle_name
from refurb.error import Error
Expand Down
10 changes: 1 addition & 9 deletions refurb/checks/builtin/no_slice_copy.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
from dataclasses import dataclass

from mypy.nodes import (
AssignmentStmt,
DelStmt,
IndexExpr,
MypyFile,
RefExpr,
SliceExpr,
Var,
)
from mypy.nodes import AssignmentStmt, DelStmt, IndexExpr, MypyFile, RefExpr, SliceExpr, Var

from refurb.error import Error
from refurb.visitor import TraverserVisitor
Expand Down
8 changes: 1 addition & 7 deletions refurb/checks/builtin/simplify_comprehension.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
from dataclasses import dataclass

from mypy.nodes import (
CallExpr,
GeneratorExpr,
ListComprehension,
NameExpr,
SetComprehension,
)
from mypy.nodes import CallExpr, GeneratorExpr, ListComprehension, NameExpr, SetComprehension

from refurb.error import Error

Expand Down
9 changes: 1 addition & 8 deletions refurb/checks/builtin/use_int_base_zero.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
from dataclasses import dataclass

from mypy.nodes import (
ArgKind,
CallExpr,
IndexExpr,
IntExpr,
RefExpr,
SliceExpr,
)
from mypy.nodes import ArgKind, CallExpr, IndexExpr, IntExpr, RefExpr, SliceExpr

from refurb.error import Error

Expand Down
10 changes: 1 addition & 9 deletions refurb/checks/flow/no_trailing_return.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
from collections.abc import Generator
from dataclasses import dataclass

from mypy.nodes import (
Block,
FuncItem,
IfStmt,
MatchStmt,
ReturnStmt,
Statement,
WithStmt,
)
from mypy.nodes import Block, FuncItem, IfStmt, MatchStmt, ReturnStmt, Statement, WithStmt
from mypy.patterns import AsPattern

from refurb.error import Error
Expand Down
10 changes: 1 addition & 9 deletions refurb/checks/flow/simplify_return.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
from dataclasses import dataclass

from mypy.nodes import (
Block,
Expression,
FuncItem,
IfStmt,
MatchStmt,
ReturnStmt,
Statement,
)
from mypy.nodes import Block, Expression, FuncItem, IfStmt, MatchStmt, ReturnStmt, Statement
from mypy.patterns import AsPattern

from refurb.error import Error
Expand Down
9 changes: 1 addition & 8 deletions refurb/checks/functools/use_cache.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
from dataclasses import dataclass

from mypy.nodes import (
ArgKind,
CallExpr,
Decorator,
MemberExpr,
NameExpr,
RefExpr,
)
from mypy.nodes import ArgKind, CallExpr, Decorator, MemberExpr, NameExpr, RefExpr

from refurb.error import Error
from refurb.settings import Settings
Expand Down
10 changes: 1 addition & 9 deletions refurb/checks/iterable/implicit_readlines.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
from dataclasses import dataclass

from mypy.nodes import (
CallExpr,
Expression,
ForStmt,
GeneratorExpr,
MemberExpr,
NameExpr,
Var,
)
from mypy.nodes import CallExpr, Expression, ForStmt, GeneratorExpr, MemberExpr, NameExpr, Var

from refurb.error import Error

Expand Down
10 changes: 1 addition & 9 deletions refurb/checks/pathlib/read_text.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
from dataclasses import dataclass

from mypy.nodes import (
AssignmentStmt,
Block,
CallExpr,
MemberExpr,
NameExpr,
StrExpr,
WithStmt,
)
from mypy.nodes import AssignmentStmt, Block, CallExpr, MemberExpr, NameExpr, StrExpr, WithStmt

from refurb.error import Error

Expand Down
9 changes: 1 addition & 8 deletions refurb/checks/pathlib/with_suffix.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
from dataclasses import dataclass

from mypy.nodes import (
CallExpr,
IndexExpr,
NameExpr,
OpExpr,
SliceExpr,
StrExpr,
)
from mypy.nodes import CallExpr, IndexExpr, NameExpr, OpExpr, SliceExpr, StrExpr

from refurb.error import Error

Expand Down
10 changes: 1 addition & 9 deletions refurb/checks/pathlib/write_text.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
from dataclasses import dataclass

from mypy.nodes import (
Block,
CallExpr,
ExpressionStmt,
MemberExpr,
NameExpr,
StrExpr,
WithStmt,
)
from mypy.nodes import Block, CallExpr, ExpressionStmt, MemberExpr, NameExpr, StrExpr, WithStmt

from refurb.error import Error

Expand Down
9 changes: 1 addition & 8 deletions refurb/checks/readability/no_temp_class_object.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
from dataclasses import dataclass

from mypy.nodes import (
CallExpr,
Decorator,
FuncDef,
MemberExpr,
NameExpr,
TypeInfo,
)
from mypy.nodes import CallExpr, Decorator, FuncDef, MemberExpr, NameExpr, TypeInfo

from refurb.error import Error

Expand Down
10 changes: 1 addition & 9 deletions refurb/checks/secrets/simplify_token_function.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
from dataclasses import dataclass

from mypy.nodes import (
CallExpr,
IndexExpr,
IntExpr,
MemberExpr,
NameExpr,
RefExpr,
SliceExpr,
)
from mypy.nodes import CallExpr, IndexExpr, IntExpr, MemberExpr, NameExpr, RefExpr, SliceExpr

from refurb.checks.common import stringify
from refurb.error import Error
Expand Down
10 changes: 1 addition & 9 deletions refurb/checks/string/expandtabs.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
from dataclasses import dataclass

from mypy.nodes import (
BytesExpr,
CallExpr,
IntExpr,
MemberExpr,
NameExpr,
OpExpr,
StrExpr,
)
from mypy.nodes import BytesExpr, CallExpr, IntExpr, MemberExpr, NameExpr, OpExpr, StrExpr

from refurb.error import Error

Expand Down
10 changes: 1 addition & 9 deletions refurb/checks/string/startswith.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,6 @@
from dataclasses import dataclass

from mypy.nodes import (
CallExpr,
Expression,
MemberExpr,
NameExpr,
OpExpr,
UnaryExpr,
Var,
)
from mypy.nodes import CallExpr, Expression, MemberExpr, NameExpr, OpExpr, UnaryExpr, Var

from refurb.checks.common import extract_binary_oper
from refurb.error import Error
Expand Down

0 comments on commit e76e8d5

Please sign in to comment.