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
This commit is contained in:
Aaron Gokaslan
2021-08-13 12:37:05 -04:00
committed by GitHub
parent d6841f60cc
commit 9df2f1ff13
45 changed files with 73 additions and 67 deletions

View File

@@ -1,7 +1,7 @@
# -*- 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)