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

Make typing optional #179

Merged
merged 7 commits into from
Dec 21, 2019

Conversation

techalchemy
Copy link
Contributor

Signed-off-by: Dan Ryan dan@danryan.co

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.7%) to 87.055% when pulling e509082 on techalchemy:bugfix/conditional-typing-import into 73124de on theskumar:master.

5 similar comments
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.7%) to 87.055% when pulling e509082 on techalchemy:bugfix/conditional-typing-import into 73124de on theskumar:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.7%) to 87.055% when pulling e509082 on techalchemy:bugfix/conditional-typing-import into 73124de on theskumar:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.7%) to 87.055% when pulling e509082 on techalchemy:bugfix/conditional-typing-import into 73124de on theskumar:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.7%) to 87.055% when pulling e509082 on techalchemy:bugfix/conditional-typing-import into 73124de on theskumar:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.7%) to 87.055% when pulling e509082 on techalchemy:bugfix/conditional-typing-import into 73124de on theskumar:master.

@coveralls
Copy link

coveralls commented May 16, 2019

Coverage Status

Coverage decreased (-0.7%) to 89.067% when pulling 2159c69 on techalchemy:bugfix/conditional-typing-import into b7759b7 on theskumar:master.

- Fall back to `collections.namedtuple` for `Binding` when typing is
  not present
- Add import guards to all imports
- Fixes theskumar#178

Signed-off-by: Dan Ryan <dan@danryan.co>
Signed-off-by: Dan Ryan <dan@danryan.co>
Signed-off-by: Dan Ryan <dan@danryan.co>
@techalchemy techalchemy force-pushed the bugfix/conditional-typing-import branch from d031087 to 7a90934 Compare June 8, 2019 08:40
@techalchemy
Copy link
Contributor Author

Is this change something you are willing to consider? It should be fairly straightforward to use this approach and it avoids the extra imports when not running under a type checker / in an editor

Copy link
Collaborator

@bbc2 bbc2 left a comment

Choose a reason for hiding this comment

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

Thank you for the pull request. I left a few inline comments but I'm overall OK with the change.

src/dotenv/compat.py Outdated Show resolved Hide resolved
src/dotenv/main.py Outdated Show resolved Hide resolved
src/dotenv/parser.py Show resolved Hide resolved
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
- Fix local test failures

Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
@techalchemy
Copy link
Contributor Author

Sorry for taking so incredibly long to update this, real life happened and I wasn't able to do much open source work recently. Luckily I am able to catch back up and it looks like the updates since I worked on this were not very drastic, so I went ahead and caught back up with master and addressed / replied to the relevant comments. Let me know how you'd like to move forward!

@bbc2 bbc2 merged commit d93324a into theskumar:master Dec 21, 2019
johnbergvall pushed a commit to johnbergvall/python-dotenv that referenced this pull request Aug 13, 2021
- Fall back to `collections.namedtuple` for `Binding` when typing is
  not present
- Add import guards to all imports
- Fixes theskumar#178
- Add missing coverage config to setup.cfg
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.

Import of typing should be conditional
3 participants