-
Notifications
You must be signed in to change notification settings - Fork 0
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
Sourcery refactored main branch #1
base: main
Are you sure you want to change the base?
Conversation
def __init__ ( | ||
def __init__( |
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.
Function PackageDoc.__init__
refactored with the following changes:
- Replace call to format with f-string (
use-fstring-for-formatting
)
def get_docstring ( | ||
def get_docstring( |
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.
Function PackageDoc.get_docstring
refactored with the following changes:
- Use named expression to simplify assignment and conditional (
use-named-expression
)
def parse_method_docstring ( | ||
def parse_method_docstring( |
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.
Function PackageDoc.parse_method_docstring
refactored with the following changes:
- Use named expression to simplify assignment and conditional [×2] (
use-named-expression
) - Replace call to format with f-string [×3] (
use-fstring-for-formatting
)
def fix_fwd_refs ( | ||
def fix_fwd_refs( |
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.
Function PackageDoc.fix_fwd_refs
refactored with the following changes:
- Replace a for append loop with list extend (
for-append-to-extend
)
def document_method ( | ||
def document_method( |
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.
Function PackageDoc.document_method
refactored with the following changes:
- Use named expression to simplify assignment and conditional (
use-named-expression
) - Move assignment closer to its usage within a block (
move-assign-in-block
) - Merge append into list declaration (
merge-list-append
) - Replace call to format with f-string [×4] (
use-fstring-for-formatting
)
def replace_pyvis_iframe ( | ||
def replace_pyvis_iframe( |
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.
Function replace_pyvis_iframe
refactored with the following changes:
- Use named expression to simplify assignment and conditional [×2] (
use-named-expression
) - Replace call to format with f-string [×4] (
use-fstring-for-formatting
)
def replace_sys_header ( | ||
def replace_sys_header( |
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.
Function replace_sys_header
refactored with the following changes:
- Use named expression to simplify assignment and conditional (
use-named-expression
)
def filter_quotes (text, is_email=True): | ||
def filter_quotes(text, is_email=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.
Function filter_quotes
refactored with the following changes:
- Use named expression to simplify assignment and conditional (
use-named-expression
)
This removes the following comments ( why? ):
# strip off any trailing unsubscription notice
def increment_edge (self, node0, node1): | ||
def increment_edge(self, node0, node1): | ||
""" | ||
increment the weight for an edge between the two given nodes, | ||
creating the edge first if needed | ||
""" | ||
if self.logger: | ||
self.logger.debug("link {} {}".format(node0, node1)) | ||
self.logger.debug(f"link {node0} {node1}") | ||
|
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.
Function TextRank.increment_edge
refactored with the following changes:
- Replace call to format with f-string (
use-fstring-for-formatting
)
def link_sentence (self, sent): | ||
def link_sentence(self, sent): |
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.
Function TextRank.link_sentence
refactored with the following changes:
- Unwrap a constant iterable constructor (
unwrap-iterable-construction
) - Simplify logical expression using De Morgan identities (
de-morgan
) - Replace call to format with f-string [×4] (
use-fstring-for-formatting
)
Branch
main
refactored by Sourcery.If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.
See our documentation here.
Run Sourcery locally
Reduce the feedback loop during development by using the Sourcery editor plugin:
Review changes via command line
To manually merge these changes, make sure you're on the
main
branch, then run:Help us improve this pull request!