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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #1407 by adding type hints to the library #1759

Closed
wants to merge 1 commit into from

Conversation

seratch
Copy link
Contributor

@seratch seratch commented Jan 8, 2022

This pull request resolves #1407 by adding type hints to this library! Sorry for sending a large PR 馃檱

@@ -66,8 +68,17 @@ def __init__(self, consumer_key, consumer_secret, access_token,
f"Tweepy/{tweepy.__version__}"
)

async def _connect(self, method, endpoint, params={}, headers=None,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is not related to type hints but this default value params={} can be potentially a cause of future bugs. As you may know, default values of method arguments can be reused. Setting mutable objects can result in sharing the same objects among multiple method calls.

@seratch
Copy link
Contributor Author

seratch commented Jan 8, 2022

I will resolve the CI builds shortly!

Also, I know this is a very large PR. If the project maintainers would like to start with a small potion of changes, please feel free to close this and take only some parts of this PR step by step.

@seratch
Copy link
Contributor Author

seratch commented Jan 9, 2022

馃憢 This pull request is now ready for reviews!

@seratch seratch mentioned this pull request Jan 24, 2022
@seratch
Copy link
Contributor Author

seratch commented Jan 24, 2022

As the team is not planning to merge this in the short term, let me switch this PR to draft mode. If the maintainers would like to close this in the future, please feel free to do so. See also: #1407 (comment)

@seratch seratch marked this pull request as draft January 24, 2022 23:50
@Harmon758 Harmon758 added the Feature This is regarding a new feature label Jan 25, 2022
@seratch
Copy link
Contributor Author

seratch commented Feb 25, 2022

Closing this PR as the team prefers smaller PRs. For context: #1407 (comment)

@seratch seratch closed this Feb 25, 2022
@Harmon758 Harmon758 added the Improvement This is regarding an improvement to an existing feature label Feb 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature This is regarding a new feature Improvement This is regarding an improvement to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Type Hints
2 participants