Skip to content

fixing issue double imported and unused import of #1436

Closed
@slowy07

Description

@slowy07

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 

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: cleanupAn internal cleanup or hygiene concern.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions