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

Add Py35 compatible type hints #1172

Merged
merged 7 commits into from
Dec 27, 2019
Merged

Add Py35 compatible type hints #1172

merged 7 commits into from
Dec 27, 2019

Conversation

PythonCoderAS
Copy link
Contributor

@PythonCoderAS PythonCoderAS commented Dec 24, 2019

Fixes # (provide issue number of applicable)

Parent PR: #1164

Combines:

This PR adds type hints and makes them compatible for Python 3.5, which supports type hinting in functions only.

Py 3.5 compatible:

def test_function(arg1: str, arg2: str) -> Dict[str, str]:
    return {arg1: arg2}

Py 3.6+ compatible:

class Test:
    classDict: Dict[str, str]
    def test_function(self, arg1: str, arg2: str) -> None:
        self.classDict = {**self.classDict, **{arg1: arg2}}

praw/const.py Outdated Show resolved Hide resolved
praw/endpoints.py Outdated Show resolved Hide resolved
praw/config.py Outdated Show resolved Hide resolved
@bboe bboe merged commit 4d7610b into praw-dev:master Dec 27, 2019
@bboe
Copy link
Member

bboe commented Dec 27, 2019

Thanks!

@PythonCoderAS PythonCoderAS deleted the py35-compatible branch December 27, 2019 14:55
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.

None yet

2 participants