Skip to content
This repository was archived by the owner on Sep 3, 2022. It is now read-only.

Commit 5deca12

Browse files
partheaYasser Elsayed
authored andcommitted
Remove unused imports. Fix F401 flake8 warnings. (#313)
* Remove unused imports. Fix F401 flake8 warnings. * Add flake8 to travis. Only report F401 codes for now.
1 parent b30dc2f commit 5deca12

File tree

67 files changed

+214
-88
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+214
-88
lines changed

.travis.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ before_install:
1919
- pip install solutionbox/image_classification/
2020
- pip install -U tensorflow==1.0.0
2121
- pip install -U protobuf==3.1.0 #v3.2.0 has the "python: double free or corruption" bug.
22+
- pip install flake8
23+
24+
before_script:
25+
- flake8 . --select=F401
26+
27+
script:
28+
- python ./tests/main.py
2229

23-
script: python ./tests/main.py
2430

datalab/bigquery/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
from ._utils import TableName, DatasetName
3030
from ._view import View
3131

32+
__all__ = ['CSVOptions', 'Dataset', 'Datasets', 'Dialect', 'FederatedTable', 'Query', 'QueryJob',
33+
'QueryResultsTable', 'QueryStats', 'Sampling', 'Schema', 'Table', 'TableMetadata',
34+
'UDF', 'TableName', 'DatasetName', 'View']
3235

3336
def wait_any(jobs, timeout=None):
3437
""" Return when at least one of the specified jobs has completed or timeout expires.

datalab/bigquery/commands/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@
1515

1616
from . import _bigquery
1717

18+
__all__ = ['_bigquery']

datalab/context/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@
1515
from ._context import Context
1616
from ._project import Project, Projects
1717

18+
__all__ = ['Context', 'Project', 'Projects']

datalab/context/commands/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@
1414
from __future__ import absolute_import
1515

1616
from . import _projects
17+
18+
__all__ = ['_projects']

datalab/data/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@
1919
from ._sql_statement import SqlStatement
2020
from ._utils import tokenize
2121

22+
__all__ = ['Csv', 'SqlModule', 'SqlStatement', 'tokenize']

datalab/data/commands/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@
1313

1414

1515
from . import _sql
16+
17+
__all__ = ['_sql']

datalab/kernel/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919

2020
try:
2121
import IPython as _IPython
22-
import IPython.core.magic as _magic
22+
import IPython.core.magic as _magic # noqa
2323
import IPython.core.interactiveshell as _shell
24-
from IPython import get_ipython
24+
from IPython import get_ipython # noqa
2525
except ImportError:
2626
raise Exception('This package requires an IPython notebook installation')
2727

datalab/notebook/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@
2020
def _jupyter_nbextension_paths():
2121
return [dict(section="notebook", src="static", dest="gcpdatalab")]
2222

23+
__all__ = ['_']

datalab/stackdriver/commands/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@
1414
from __future__ import absolute_import
1515

1616
from . import _monitoring
17+
18+
__all__ = ['_monitoring']

0 commit comments

Comments
 (0)