Skip to content

fixing issue double imported and unused import of #1436

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

Closed
slowy07 opened this issue Jul 13, 2021 · 0 comments · Fixed by #1437
Closed

fixing issue double imported and unused import of #1436

slowy07 opened this issue Jul 13, 2021 · 0 comments · Fixed by #1437
Labels
type: cleanup An internal cleanup or hygiene concern.

Comments

@slowy07
Copy link
Contributor

slowy07 commented Jul 13, 2021

maybe problems on google-api-python-client which:

  • double imported on noxfile.py by double imported of os
  • module on googleapiclient//discovery.py with module six is imported with both import and import from
  • unused module imported from six.moves.urllib.parse import urlencode, urlparse, urljoin, urlunparse, parse_qsl on discovery.py

steps to fixing the problem by:

  • remove one of module of os
  • commented from six.moves import zip and change code zip(enum, enumDesc): to six.moves.zip(enum, enumDesc):
  • commented unused imported urlencode,urlparse,urljoin,urlunparse,parse_qsl and adding code to used imported code urljoin to from six.moves.urllib.parse import urljoin

sample code

from __future__ import absolute_import
import six
# from six.moves import zip

__author__ = "jcgregorio@google.com (Joe Gregorio)"
__all__ = ["build", "build_from_document", "fix_method_name", "key2param"]

from six import BytesIO
from six.moves import http_client
# from six.moves.urllib.parse import urlencode, urlparse, urljoin, urlunparse, parse_qsl
from six.moves.urllib.parse import urljoin 
@slowy07 slowy07 mentioned this issue Jul 13, 2021
4 tasks
@parthea parthea added the type: cleanup An internal cleanup or hygiene concern. label Jul 13, 2021
gcf-merge-on-green bot pushed a commit that referenced this issue Jul 13, 2021
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
- [x] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/google-api-python-client/issues/new/choose) before writing your code!  That way we can discuss the change, evaluate designs, and agree on the general idea
- [x] Ensure the tests and linter pass
- [x] Code coverage does not decrease (if any source code was changed)
- [x] Appropriate docs were updated (if necessary)

Fixes #1436 🦕
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: cleanup An internal cleanup or hygiene concern.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants