Skip to content

Commit

Permalink
Black can fail as described here: psf/black#1161
Browse files Browse the repository at this point in the history
  • Loading branch information
flachica committed Jun 21, 2020
1 parent dc297c3 commit c0b75c6
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/plugins/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
from hooks import IndicatorSpec, ListBoxRowTodoSpec

# Dynamic import all classes located here
# If the class is not subclass of allowed spec, this is not will be imported
# The allowed classes must be declared and decorated with pluggy.HookspecMarker function in the hooks package
# If the class is not subclass of allowed spec,
# this is not will be imported
# The allowed classes must be declared and decorated
# with pluggy.HookspecMarker function in the hooks package
package_dir = Path(__file__).resolve().parent
indicatorPluginClasses = []
listBoxRowTodoPluginClasses = []
Expand All @@ -21,9 +23,9 @@
class_ = attribute.__name__
if class_ in indicatorPluginClasses:
print(
"The class '{}' appears in more than one installed plugin. You must unninstall these".format(
class_
)
"The class '{}' appears in more than one "
"installed plugin. "
"You must unninstall these".format(class_)
)
else:
indicatorPluginClasses.append(class_)
Expand All @@ -32,15 +34,16 @@
class_ = attribute.__name__
if class_ in listBoxRowTodoPluginClasses:
print(
"The class '{}' appears in more than one installed plugin. You must unninstall these".format(
"The class '{}' appears in more than one "
"installed plugin. You must unninstall these".format(
class_
)
)
else:
listBoxRowTodoPluginClasses.append(class_)
elif isclass(attribute):
print(
"The class {} was not imported because must be subclass of almost one class form hooks package".format(
attribute.__name__
)
"The class {} was not imported "
"because must be subclass of almost "
"one class form hooks package".format(attribute.__name__)
)

0 comments on commit c0b75c6

Please sign in to comment.