Skip to content

Commit

Permalink
refactor: remove unneeded variable
Browse files Browse the repository at this point in the history
  • Loading branch information
andreoliwa committed Jan 15, 2022
1 parent b27e9c0 commit 51beb8b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/nitpick/blender.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,6 @@ def load(self) -> bool:
if self._string is not None:
# TODO: I tried to replace toml by tomlkit, but lots of tests break.
if self.use_tomlkit:
toml_obj = tomlkit.loads(self._string)

# TODO: use only tomlkit and remove uiri/toml
# Removing empty tables on loads() didn't work.
# The empty tables are gone, but:
Expand All @@ -508,6 +506,7 @@ def load(self) -> bool:
# '"pyproject.toml".tool.black: Unknown file. See '
# 'https://nitpick.rtfd.io/en/latest/plugins.html.']

# toml_obj = tomlkit.loads(self._string)
# if "tool.black" in self._string:
# from tomlkit.items import KeyType, SingleKey
#
Expand All @@ -517,7 +516,7 @@ def load(self) -> bool:
# toml_obj.add(SingleKey('"pyproject.toml".tool.black', KeyType.Bare), black_dict)
# result = tomlkit.dumps(toml_obj)
# print(result)
self._object = toml_obj
self._object = tomlkit.loads(self._string)
else:
self._object = toml.loads(self._string, decoder=InlineTableTomlDecoder(dict)) # type: ignore[call-arg,assignment]
if self._object is not None:
Expand Down

0 comments on commit 51beb8b

Please sign in to comment.