Unverified Commit 9df2f1ff authored by Aaron Gokaslan's avatar Aaron Gokaslan Committed by GitHub
Browse files

maint(precommit): Apply isort (#3195)

* Apply isort

* Tweak isort config

* Add env.py as a known_first_party

* Add one missing known first party

* Make config compat with older isort versions

* Add another comment

* Revert pyproject setting
parent d6841f60
# -*- coding: utf-8 -*-
import pytest
from pybind11_tests import copy_move_policies as m
......
# -*- coding: utf-8 -*-
import pytest
from pybind11_tests import custom_type_casters as m
......
# -*- coding: utf-8 -*-
import pytest
from pybind11_tests import ConstructorStats
np = pytest.importorskip("numpy")
......
# -*- coding: utf-8 -*-
import pytest
from pybind11_tests import enums as m
......
......@@ -4,7 +4,6 @@ import os
import pytest
import env # noqa: F401
from pybind11_tests import eval_ as m
......
......@@ -4,9 +4,8 @@ import sys
import pytest
import env # noqa: F401
from pybind11_tests import exceptions as m
import pybind11_cross_module_tests as cm
from pybind11_tests import exceptions as m
def test_std_exception(msg):
......
# -*- coding: utf-8 -*-
import pytest
import re
import env # noqa: F401
import pytest
import env # noqa: F401
from pybind11_tests import ConstructorStats
from pybind11_tests import factory_constructors as m
from pybind11_tests.factory_constructors import tag
from pybind11_tests import ConstructorStats
def test_init_factory_basic():
......
# -*- coding: utf-8 -*-
from pybind11_tests import iostream as m
import sys
from contextlib import contextmanager
from pybind11_tests import iostream as m
try:
# Python 3
from io import StringIO
......
......@@ -2,7 +2,6 @@
import pytest
import env # noqa: F401
from pybind11_tests import kwargs_and_defaults as m
......
......@@ -2,7 +2,6 @@
import pytest
import env # noqa: F401
from pybind11_tests import local_bindings as m
......
......@@ -2,9 +2,8 @@
import pytest
import env # noqa: F401
from pybind11_tests import methods_and_attributes as m
from pybind11_tests import ConstructorStats
from pybind11_tests import methods_and_attributes as m
def test_methods_and_attributes():
......
# -*- coding: utf-8 -*-
from pybind11_tests import ConstructorStats
from pybind11_tests import modules as m
from pybind11_tests.modules import subsubmodule as ms
from pybind11_tests import ConstructorStats
def test_nested_modules():
......@@ -54,18 +54,20 @@ def test_reference_internal():
def test_importing():
from pybind11_tests.modules import OD
from collections import OrderedDict
from pybind11_tests.modules import OD
assert OD is OrderedDict
assert str(OD([(1, "a"), (2, "b")])) == "OrderedDict([(1, 'a'), (2, 'b')])"
def test_pydoc():
"""Pydoc needs to be able to provide help() for everything inside a pybind11 module"""
import pybind11_tests
import pydoc
import pybind11_tests
assert pybind11_tests.__name__ == "pybind11_tests"
assert pybind11_tests.__doc__ == "pybind11 test module"
assert pydoc.text.docmodule(pybind11_tests)
......
......@@ -2,7 +2,6 @@
import pytest
import env # noqa: F401
from pybind11_tests import ConstructorStats
from pybind11_tests import multiple_inheritance as m
......
......@@ -2,7 +2,6 @@
import pytest
import env # noqa: F401
from pybind11_tests import numpy_array as m
np = pytest.importorskip("numpy")
......
......@@ -4,7 +4,6 @@ import re
import pytest
import env # noqa: F401
from pybind11_tests import numpy_dtypes as m
np = pytest.importorskip("numpy")
......
# -*- coding: utf-8 -*-
import pytest
from pybind11_tests import numpy_vectorize as m
np = pytest.importorskip("numpy")
......
# -*- coding: utf-8 -*-
import pytest
from pybind11_tests import opaque_types as m
from pybind11_tests import ConstructorStats, UserType
from pybind11_tests import opaque_types as m
def test_string_list():
......
# -*- coding: utf-8 -*-
import pytest
from pybind11_tests import operators as m
from pybind11_tests import ConstructorStats
from pybind11_tests import operators as m
def test_operator_overloading():
......
......@@ -2,7 +2,6 @@
import pytest
import env # noqa: F401
from pybind11_tests import pickling as m
try:
......
# -*- coding: utf-8 -*-
from __future__ import division
import pytest
import sys
import env # noqa: F401
import pytest
from pybind11_tests import pytypes as m
import env # noqa: F401
from pybind11_tests import debug_enabled
from pybind11_tests import pytypes as m
def test_int(doc):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment