Skip to content

Commit

Permalink
remove catch for black config error as we handle implicitly now
Browse files Browse the repository at this point in the history
  • Loading branch information
mbhall88 committed Oct 1, 2020
1 parent 1f7ac81 commit 9f3abcf
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions snakefmt/formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@
import toml

from snakefmt import DEFAULT_LINE_LENGTH
from snakefmt.exceptions import (
InvalidBlackConfiguration,
InvalidParameterSyntax,
InvalidPython,
MalformattedToml,
)
from snakefmt.exceptions import InvalidParameterSyntax, InvalidPython, MalformattedToml
from snakefmt.parser.grammar import SnakeRule
from snakefmt.parser.parser import Parser
from snakefmt.parser.syntax import (
Expand Down Expand Up @@ -94,10 +89,7 @@ def read_black_config(self, path: PathLike) -> black.FileMode:

snakecase_config[key] = val

try:
return black.FileMode(**snakecase_config)
except TypeError as error:
raise InvalidBlackConfiguration(error)
return black.FileMode(**snakecase_config)

@property
def line_length(self) -> int:
Expand Down

0 comments on commit 9f3abcf

Please sign in to comment.