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

Update providers.py #30

Merged
merged 1 commit into from
Jul 21, 2024
Merged

Update providers.py #30

merged 1 commit into from
Jul 21, 2024

Conversation

JayacharanR
Copy link
Contributor

Fixed the issue: SyntaxError : f-string: unmatched '['

Problem of f-string unable to take single quotes is fixed with replacing double quotes.

Previous Version : proxy = [f'{proxy['host']}:{proxy['port']}',proxy['protocol']]

Current Change: proxy = [f'{proxy["host"]}:{proxy["port"]}',proxy['protocol']]

Place of Error Occurence:

from swiftshadow import QuickProxy
from requests import get

proxy = QuickProxy()
resp = get('https://checkip.amazonaws.com', proxies={proxy[1]: proxy[0]})
print(resp.text)

Fixed the issue: SyntaxError : f-string: unmatched '['

problem of f-string unable to take single quotes is fixed with replacing double quotes

Previous Version : proxy = [f'{proxy['host']}:{proxy['port']}',proxy['protocol']] 

Current Change: proxy = [f'{proxy["host"]}:{proxy["port"]}',proxy['protocol']]
@sachin-sankar
Copy link
Owner

Fixes #28

Will include in the next hotfix.

@sachin-sankar sachin-sankar linked an issue Jul 21, 2024 that may be closed by this pull request
@sachin-sankar sachin-sankar merged commit 8164e4c into sachin-sankar:main Jul 21, 2024
1 check failed
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.

SyntaxError: f-string: unmatched '['
2 participants