Skip to content
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 Starbot ⭐ refactored thinhnggia/NLP-progress #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SourceryAI
Copy link

Thanks for starring sourcery-ai/sourcery ✨ 🌟 ✨

Here's your pull request refactoring your most popular Python repo.

If you want Sourcery to refactor all your Python repos and incoming pull requests install our bot.

Review changes via command line

To manually merge these changes, make sure you're on the master branch, then run:

git fetch https://github.com/sourcery-ai-bot/NLP-progress master
git merge --ff-only FETCH_HEAD
git reset HEAD^

if name.endswith(":"):
name = name[:-1]

name = name.removesuffix(":")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function sanitize_subdataset_name refactored with the following changes:

  • Replace a conditional string slice with a call to str.removesuffix or str.removeprefix, where applicable (use-string-remove-affix)

Comment on lines -67 to +65
before = None
if l.strip() != "":
before = l.strip()
before = l.strip() if l.strip() != "" else None
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function extract_lines_before_tables refactored with the following changes:

Comment on lines -102 to +104
for i in range(len(subdatasets)):
out.append({
out.extend(
{
"subdataset": subdatasets[i],
"sota": extract_sota_table(sota_tables[i])
})

"sota": extract_sota_table(sota_tables[i]),
}
for i in range(len(subdatasets))
)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function handle_multiple_sota_table_exceptions refactored with the following changes:

Comment on lines -156 to +155
print("WARNING: Found multiple paper references: `%s`, using only the first..." % paper_md)
print(
f"WARNING: Found multiple paper references: `{paper_md}`, using only the first..."
)
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function extract_paper_title_and_link refactored with the following changes:

Comment on lines 193 to -195

sota = {}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function extract_sota_table refactored with the following changes:

This removes the following comments ( why? ):

# extract all the metrics

Comment on lines -346 to +339
cur = [line]
else:
cur = [line]
cur = [line]
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function parse_markdown_file refactored with the following changes:

This removes the following comments ( why? ):

# see if there is an arxiv link in the first paragraph of the description

Comment on lines -459 to +447
print("Processing `%s`..." % md_file)
print(f"Processing `{md_file}`...")
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function parse_markdown_directory refactored with the following changes:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant