Skip to content

Commit 87dd2cd

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 9ab9357 commit 87dd2cd

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed

aiida_upgrade/entry_points.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,10 @@ class FactoryCoreTransformer(cst.CSTTransformer):
7777
"""Transformer that adds the ``core.`` prefix to deprecated aiida-core v1 entry points."""
7878

7979
def leave_Call(self, original_node: cst.Call, updated_node: cst.Call) -> cst.Call:
80-
8180
try:
8281
function = original_node.func.value
8382

8483
if function in FACTORY_MAPPING.keys():
85-
8684
entry_point = original_node.args[0].value.value
8785
string_quote = entry_point[0]
8886
entry_point = entry_point.strip(string_quote)
@@ -112,12 +110,10 @@ class FullEntryPointTransformer(cst.CSTTransformer):
112110
def leave_SimpleString(
113111
self, original_node: cst.SimpleString, updated_node: cst.SimpleString
114112
) -> cst.SimpleString:
115-
116113
if "aiida." not in original_node.value:
117114
return original_node
118115

119116
for entry_group, entry_points in DEPRECATED_ENTRY_POINTS_MAPPING.items():
120-
121117
option_string = "|".join(entry_points)
122118

123119
match = re.match(

aiida_upgrade/methods.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,9 @@ class DictListNoKeywordTransformer(cst.CSTTransformer):
2222
list_keyword = matchers.Name("list")
2323

2424
def leave_Call(self, original_node: cst.Call, updated_node: cst.Call) -> cst.Call:
25-
2625
if matchers.matches(
2726
original_node.func, self.dict_constructor | self.list_constructor
2827
):
29-
3028
# Empty `Dict` or `List` constructor
3129
if len(original_node.args) == 0:
3230
return original_node

0 commit comments

Comments
 (0)