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 refactored main branch #1

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

Conversation

sourcery-ai[bot]
Copy link

@sourcery-ai sourcery-ai bot commented Feb 17, 2022

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:

git fetch origin sourcery/main
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

@sourcery-ai sourcery-ai bot requested a review from xinetzone February 17, 2022 00:22
Comment on lines -24 to +25
return (
today_version + f".{dev_num}",
today_version + f".dev{dev_num+1}",
)
return (
today_version,
today_version + ".dev1",
)
return f'{today_version}.{dev_num}', f'{today_version}.dev{dev_num + 1}'
return today_version, f'{today_version}.dev1'
Copy link
Author

Choose a reason for hiding this comment

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

Function _determine_versions refactored with the following changes:

if not foreground:
foreground = fallbacks["foreground"]
else:
foreground = f"#{foreground}"

foreground = fallbacks["foreground"] if not foreground else f"#{foreground}"
Copy link
Author

Choose a reason for hiding this comment

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

Function get_pygments_style_colors refactored with the following changes:

Comment on lines -116 to -122
if "hide-toc" in file_meta:
return True
elif "toc" not in context:
if "hide-toc" in file_meta or "toc" not in context or not context["toc"]:
return True
elif not context["toc"]:
return True

Copy link
Author

Choose a reason for hiding this comment

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

Function _compute_hide_toc refactored with the following changes:

Comment on lines -137 to +128
index = static.index("_static/" + asset)
index = static.index(f'_static/{asset}')
Copy link
Author

Choose a reason for hiding this comment

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

Function _add_asset_hashes refactored with the following changes:

Comment on lines -38 to +41
lines = []
if not block.strip("\n"):
return StringList()

lines.append("````````{tab} Markdown (MyST)")
lines.append("```````md")
lines = ['````````{tab} Markdown (MyST)', '```````md']
Copy link
Author

Choose a reason for hiding this comment

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

Function _md_demo refactored with the following changes:

Comment on lines -53 to +64
lines = []
if not block.strip():
return StringList()

lines.append("````````{tab} reStructuredText")
lines.append("```````{eval-rst}")
lines.append(".. code-block:: rest")
lines.append("")
lines = [
'````````{tab} reStructuredText',
'```````{eval-rst}',
'.. code-block:: rest',
'',
]

lines.extend(indent(block, " ").splitlines())
lines.append("")
lines.extend(block.splitlines())
lines.append("```````")
lines.append("````````")

lines.extend(("```````", "````````"))
Copy link
Author

Choose a reason for hiding this comment

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

Function _rst_demo 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
0 participants