mirror of
https://github.com/pybind/pybind11.git
synced 2026-03-14 20:27:47 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user