File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 126126]
127127
128128
129- PyTreeDef = PyTreeSpec # alias
129+ PyTreeDef : TypeAlias = PyTreeSpec # alias
130130
131131T = TypeVar ('T' )
132132S = TypeVar ('S' )
Original file line number Diff line number Diff line change @@ -228,23 +228,15 @@ typing-modules = ["optree.typing"]
228228"__init__.py" = [
229229 " F401" , # unused-import
230230]
231- "optree/typing.py" = [
232- " E402" , # module-import-not-at-top-of-file
233- " F722" , # forward-annotation-syntax-error
234- " F811" , # redefined-while-unused
235- ]
236231"setup.py" = [
237232 " D" , # pydocstyle
238- " ANN" , # flake8-annotations
239233]
240234"tests/**/*.py" = [
241235 " D" , # pydocstyle
242236 " ANN" , # flake8-annotations
243237 " S" , # flake8-bandit
244- " BLE" , # flake8-blind-except
245238 " SIM" , # flake8-simplify
246239 " INP001" , # flake8-no-pep420
247- " E402" , # module-import-not-at-top-of-file
248240]
249241"docs/source/conf.py" = [
250242 " D" , # pydocstyle
@@ -253,7 +245,6 @@ typing-modules = ["optree.typing"]
253245]
254246".github/workflows/**/*.py" = [
255247 " D" , # pydocstyle
256- " ANN" , # flake8-annotations
257248]
258249
259250[tool .ruff .lint .isort ]
Original file line number Diff line number Diff line change @@ -527,11 +527,14 @@ def shuffle_dictionary(x):
527527 namespace = namespace ,
528528 )
529529 assert shuffled_treespec .is_prefix (shuffled_suffix_treespec )
530- () == optree .prefix_errors ( # noqa: B015
531- shuffled_tree ,
532- shuffled_suffix_tree ,
533- none_is_leaf = none_is_leaf ,
534- namespace = namespace ,
530+ assert (
531+ optree .prefix_errors (
532+ shuffled_tree ,
533+ shuffled_suffix_tree ,
534+ none_is_leaf = none_is_leaf ,
535+ namespace = namespace ,
536+ )
537+ == []
535538 )
536539
537540
You can’t perform that action at this time.
0 commit comments