-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more notebooks #52
Conversation
@@ -195,8 +195,8 @@ def _func(*args, **kwargs): | |||
print(indent + f' Function <{name}> starts.') | |||
start = time() | |||
res = func(*args, **kwargs) | |||
time = (time() - start) * 1e3 | |||
print(indent + f' Function <{name}> ends! Time cost = {time} msec.') | |||
time_ = (time() - start) * 1e3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
WPS120 Found regular name with trailing underscore: time_
time = (time() - start) * 1e3 | ||
print(indent + f' Function <{name}> ends! Time cost = {time} msec.') | ||
time_ = (time() - start) * 1e3 | ||
print(indent + f' Function <{name}> ends! Time cost = {time_:.2f} msec.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
WPS221 Found line with high Jones Complexity: 15 > 14
|
||
|
||
@export | ||
def tree_to_svg(graph_tree, save_as='data_types', view=True): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
D103 Missing docstring in public function
appletree/utils.py
Outdated
graph_tree.render(save_as, view=view) | ||
with open(f'{save_as}.svg', mode='r') as f: | ||
svg = add_spaces(f.readlines()[5:]) | ||
# os.remove(f'{save_as}.svg') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
E800 Found commented out code
appletree/utils.py
Outdated
|
||
|
||
@export | ||
def add_deps_to_graph_tree(context, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
W291 trailing whitespace
appletree/utils.py
Outdated
dep_plugin = context._plugin_class_registry[dep] | ||
graph_tree.edge(plugin_name, dep_plugin.__name__) | ||
graph_tree, _seen = add_plugins_to_graph_tree( | ||
context, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
W291 trailing whitespace
appletree/utils.py
Outdated
context, | ||
graph_tree, | ||
plugin.depends_on, | ||
_seen |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
WPS121 Found usage of a variable marked as unused: _seen
appletree/utils.py
Outdated
context, | ||
graph_tree, | ||
plugin.depends_on, | ||
_seen |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
C812 missing trailing comma
plugin.depends_on, | ||
_seen | ||
) | ||
_seen.append(data_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
WPS121 Found usage of a variable marked as unused: _seen
_seen | ||
) | ||
_seen.append(data_name) | ||
return graph_tree, _seen |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
WPS121 Found usage of a variable marked as unused: _seen
@export | ||
def add_deps_to_graph_tree(context, | ||
graph_tree, | ||
data_names: list = ['cs1', 'cs2', 'eff'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
B006 Do not use mutable data structures for argument defaults. They are created during function definition time. All calls to the function reuse this one instance of that data structure, persisting changes between them.
@export | ||
def add_deps_to_graph_tree(context, | ||
graph_tree, | ||
data_names: list = ['cs1', 'cs2', 'eff'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
WPS404 Found complex default value
@export | ||
def add_plugins_to_graph_tree(context, | ||
graph_tree, | ||
data_names: list = ['cs1', 'cs2', 'eff'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
B006 Do not use mutable data structures for argument defaults. They are created during function definition time. All calls to the function reuse this one instance of that data structure, persisting changes between them.
@export | ||
def add_plugins_to_graph_tree(context, | ||
graph_tree, | ||
data_names: list = ['cs1', 'cs2', 'eff'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
WPS404 Found complex default value
context, | ||
graph_tree, | ||
plugin.depends_on, | ||
_seen, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
WPS121 Found usage of a variable marked as unused: _seen
Try to solve #36