Skip to content

Conversation

@sourcery-ai
Copy link

@sourcery-ai sourcery-ai bot commented Sep 3, 2023

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 hasnocool September 3, 2023 19:03
Comment on lines -13 to +15
# Find the index of "Copy code" line
copy_code_index = -1
for i, line in enumerate(lines):
if line.strip() == 'Copy code':
copy_code_index = i
break

copy_code_index = next(
(i for i, line in enumerate(lines) if line.strip() == 'Copy code'), -1
)
Copy link
Author

Choose a reason for hiding this comment

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

Function clean_pinescript refactored with the following changes:

This removes the following comments ( why? ):

# Find the index of "Copy code" line

directory_path = "PineScripts"

file_count = sum([len(files) for _, _, files in os.walk(directory_path)])
file_count = sum(len(files) for _, _, files in os.walk(directory_path))
Copy link
Author

Choose a reason for hiding this comment

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

Lines 25-25 refactored with the following changes:


while True:
url = base_url + f'page-{page}/?script_type=strategies&script_access=open&sort=month_popular&route_range=1'
url = f'{base_url}page-{page}/?script_type=strategies&script_access=open&sort=month_popular&route_range=1'
Copy link
Author

Choose a reason for hiding this comment

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

Lines 21-42 refactored with the following changes:


async def download_page(session, page):
url = base_url + f'page-{page}/?script_type=strategies&script_access=open&sort=month_popular&route_range=1'
url = f'{base_url}page-{page}/?script_type=strategies&script_access=open&sort=month_popular&route_range=1'
Copy link
Author

Choose a reason for hiding this comment

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

Function download_page refactored with the following changes:


async def download_page(session, page):
url = base_url + f'page-{page}/?script_type=strategies&script_access=open&sort=month_popular&route_range=1'
url = f'{base_url}page-{page}/?script_type=strategies&script_access=open&sort=month_popular&route_range=1'
Copy link
Author

Choose a reason for hiding this comment

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

Function download_page refactored with the following changes:


def download_page(page):
url = base_url + f'page-{page}/?script_type=strategies&script_access=open&sort=month_popular&route_range=1'
url = f'{base_url}page-{page}/?script_type=strategies&script_access=open&sort=month_popular&route_range=1'
Copy link
Author

Choose a reason for hiding this comment

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

Function download_page refactored with the following changes:


async def download_page(session, page):
url = base_url + f'page-{page}/?script_type=strategies&script_access=open&sort=month_popular&route_range=1'
url = f'{base_url}page-{page}/?script_type=strategies&script_access=open&sort=month_popular&route_range=1'
Copy link
Author

Choose a reason for hiding this comment

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

Function download_page refactored with the following changes:


async def download_page(session, page):
url = base_url + f'page-{page}/?script_type=strategies&script_access=open&sort=month_popular&route_range=1'
url = f'{base_url}page-{page}/?script_type=strategies&script_access=open&sort=month_popular&route_range=1'
Copy link
Author

Choose a reason for hiding this comment

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

Function download_page 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