Skip to content

Commit 3509289

Browse files
garymmgramalingam
andauthoredMar 1, 2022
Python clean up (onnx#3982)
* Python clean up * Remove __future__ imports that are no-ops on Python 3. This code does not support Python 2 anymore so they're not needed. * Remove some unused imports. * Fix a couple things that trigger warnings on pytest: * In function_test.py, mark a string as raw so that the invalid escape sequence warning is not triggered. * In test_case.py, set `TestCase.__test__ = False` so that PyTest knows it's not a runnable test. * Some other changes introduced by gen_doc.py that probably should have been made in an earlier commit. This just brings the genereated docs in sync with the source files. Signed-off-by: Gary Miguel <garymiguel@microsoft.com> * remove extra blank lines before imports Signed-off-by: Gary Miguel <garymiguel@microsoft.com> * gen_doc Signed-off-by: Gary Miguel <garymiguel@microsoft.com> * Use types directly rather than strings now that Python > 3.6 Signed-off-by: Gary Miguel <garymiguel@microsoft.com> * add annotations future import Signed-off-by: Gary Miguel <garymiguel@microsoft.com> * undo Changelog Signed-off-by: Gary Miguel <garymiguel@microsoft.com> * fix mypy Signed-off-by: Gary Miguel <garymiguel@microsoft.com> * flake8 style Signed-off-by: Gary Miguel <garymiguel@microsoft.com> Co-authored-by: G. Ramalingam <grama@microsoft.com>
1 parent 5a66287 commit 3509289

File tree

232 files changed

+37
-1137
lines changed

Some content is hidden

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

232 files changed

+37
-1137
lines changed
 

‎docs/Operators.md

-5
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,6 @@ expect(node, inputs=[x], outputs=[y],
256256
```python
257257
# SPDX-License-Identifier: Apache-2.0
258258

259-
from __future__ import absolute_import
260-
from __future__ import division
261-
from __future__ import print_function
262-
from __future__ import unicode_literals
263-
264259
import numpy as np # type: ignore
265260

266261

‎onnx/__init__.py

-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
# SPDX-License-Identifier: Apache-2.0
22

3-
from __future__ import absolute_import
4-
from __future__ import division
5-
from __future__ import print_function
6-
from __future__ import unicode_literals
7-
83
import os
94

105
from .onnx_cpp2py_export import ONNX_ML

0 commit comments

Comments
 (0)