Skip to content

Commit

Permalink
style: Update files to match black style
Browse files Browse the repository at this point in the history
  • Loading branch information
jmgate committed Mar 4, 2024
1 parent f1c5c86 commit cd58f9c
Show file tree
Hide file tree
Showing 12 changed files with 225 additions and 282 deletions.
3 changes: 2 additions & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
For the full list of built-in configuration values, see the documentation:
https://www.sphinx-doc.org/en/master/usage/configuration.html
"""

from pathlib import Path
import sys

Expand Down Expand Up @@ -53,7 +54,7 @@
autodoc_default_options = {
"show-inheritance": True,
"members": True,
"undoc-members": True
"undoc-members": True,
}
autoclass_content = "both"
autodoc_preserve_defaults = True
Expand Down
10 changes: 5 additions & 5 deletions example/build_flex.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@
f"git clone --depth 1 --branch {FLEX_VERSION} "
f"https://github.com/westes/flex.git {FLEX_VERSION}",
live_stdout=True,
live_stderr=True
live_stderr=True,
)
sl.log(
"Run `autogen`.",
"./autogen.sh",
cwd=Path.cwd() / FLEX_VERSION,
live_stdout=True,
live_stderr=True
live_stderr=True,
)
measure = ["cpu", "memory", "disk"]
sl.log(
Expand All @@ -39,23 +39,23 @@
cwd=Path.cwd() / FLEX_VERSION,
live_stdout=True,
live_stderr=True,
measure=measure
measure=measure,
)
sl.log(
"Build `libcompat.la`.",
"make libcompat.la",
cwd=Path.cwd() / f"{FLEX_VERSION}/lib",
live_stdout=True,
live_stderr=True,
measure=measure
measure=measure,
)
sl.log(
"Build & install flex.",
"make install-exec",
cwd=Path.cwd() / FLEX_VERSION,
live_stdout=True,
live_stderr=True,
measure=measure
measure=measure,
)
sl.finalize()
print(f"Open {sl.html_file} to view the log.")
2 changes: 1 addition & 1 deletion example/hello_world_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
sl.log(
"Tell everyone who you are, but from a different directory.",
"whoami",
cwd=Path.cwd().parent
cwd=Path.cwd().parent,
)
sl.finalize()
print(f"Open {sl.html_file} to view the log.")
7 changes: 3 additions & 4 deletions example/hello_world_html_and_console.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
from shell_logger import ShellLogger

sl = ShellLogger(
"Hello World HTML and Console",
Path.cwd() / f"log_{Path(__file__).stem}"
"Hello World HTML and Console", Path.cwd() / f"log_{Path(__file__).stem}"
)
sl.print(
"This example demonstrates logging information both to the HTML log file "
Expand All @@ -24,14 +23,14 @@
"Greet everyone to make them feel welcome.",
"echo 'Hello World'",
live_stdout=True,
live_stderr=True
live_stderr=True,
)
sl.log(
"Tell everyone who you are, but from a different directory.",
"whoami",
cwd=Path.cwd().parent,
live_stdout=True,
live_stderr=True
live_stderr=True,
)
sl.finalize()
print(f"Open {sl.html_file} to view the log.")
7 changes: 3 additions & 4 deletions example/hello_world_html_with_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
from shell_logger import ShellLogger

sl = ShellLogger(
"Hello World HTML with Stats",
Path.cwd() / f"log_{Path(__file__).stem}"
"Hello World HTML with Stats", Path.cwd() / f"log_{Path(__file__).stem}"
)
sl.print(
"This example demonstrates logging information solely to the HTML log "
Expand All @@ -24,13 +23,13 @@
sl.log(
"Greet everyone to make them feel welcome.",
"echo 'Hello World'",
measure=measure
measure=measure,
)
sl.log(
"Tell everyone who you are, but from a different directory.",
"whoami",
cwd=Path.cwd().parent,
measure=measure
measure=measure,
)
sl.finalize()
print(f"Open {sl.html_file} to view the log.")
2 changes: 1 addition & 1 deletion shell_logger/abstract_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def __init__(self):
implemented for the class to be concrete.
"""
class_name = (
inspect.stack()[1].frame.f_locals['self'].__class__.__name__
inspect.stack()[1].frame.f_locals["self"].__class__.__name__
)
method_name = inspect.stack()[1].function
super().__init__(f"`{class_name}` must implement `{method_name}()`.")
Loading

0 comments on commit cd58f9c

Please sign in to comment.