diff --git a/.ci/basedpyright.json b/.ci/basedpyright.json new file mode 100644 index 00000000..0afd2579 --- /dev/null +++ b/.ci/basedpyright.json @@ -0,0 +1,11650 @@ +{ + "files": { + "./examples/00-post_processing/post_processing.py": [ + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 9, + "endColumn": 29, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 0, + "endColumn": 14, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 0, + "endColumn": 61, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 19, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 19, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 11, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 11, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 11, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 35, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 11, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 11, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 11, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 11, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 10, + "endColumn": 37, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 26, + "endColumn": 37, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 11, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 11, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportAbstractUsage", + "range": { + "startColumn": 17, + "endColumn": 1, + "lineCount": 5 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 11, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportAbstractUsage", + "range": { + "startColumn": 11, + "endColumn": 70, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 11, + "endColumn": 70, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAbstractUsage", + "range": { + "startColumn": 17, + "endColumn": 82, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 17, + "endColumn": 82, + "lineCount": 1 + } + }, + { + "code": "reportAbstractUsage", + "range": { + "startColumn": 18, + "endColumn": 84, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 18, + "endColumn": 84, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 19, + "lineCount": 1 + } + } + ], + "./examples/00-post_processing/post_processing_callbacks_and_animation.py": [ + { + "code": "reportCallIssue", + "range": { + "startColumn": 11, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportAbstractUsage", + "range": { + "startColumn": 5, + "endColumn": 56, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 5, + "endColumn": 56, + "lineCount": 1 + } + }, + { + "code": "reportAbstractUsage", + "range": { + "startColumn": 11, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 11, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportAbstractUsage", + "range": { + "startColumn": 6, + "endColumn": 29, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 6, + "endColumn": 29, + "lineCount": 1 + } + }, + { + "code": "reportAbstractUsage", + "range": { + "startColumn": 6, + "endColumn": 29, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 6, + "endColumn": 29, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 17, + "endColumn": 24, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 25, + "endColumn": 39, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 25, + "endColumn": 39, + "lineCount": 1 + } + } + ], + "./examples/00-post_processing/post_processing_context_manager.py": [ + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 4, + "endColumn": 9, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 9, + "endColumn": 29, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 0, + "endColumn": 14, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 0, + "endColumn": 61, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 14, + "endColumn": 48, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 30, + "endColumn": 48, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 14, + "endColumn": 41, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 30, + "endColumn": 41, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 14, + "endColumn": 41, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 30, + "endColumn": 41, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 17, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 33, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 14, + "endColumn": 48, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 30, + "endColumn": 48, + "lineCount": 1 + } + }, + { + "code": "reportAbstractUsage", + "range": { + "startColumn": 21, + "endColumn": 5, + "lineCount": 3 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 52, + "endColumn": 79, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 68, + "endColumn": 79, + "lineCount": 1 + } + }, + { + "code": "reportAbstractUsage", + "range": { + "startColumn": 15, + "endColumn": 51, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 15, + "endColumn": 51, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 19, + "endColumn": 27, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 19, + "endColumn": 27, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 19, + "endColumn": 27, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 19, + "endColumn": 27, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 19, + "endColumn": 27, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 19, + "endColumn": 27, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 19, + "endColumn": 27, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 19, + "endColumn": 27, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 19, + "endColumn": 27, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 19, + "endColumn": 27, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 19, + "endColumn": 27, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 19, + "endColumn": 27, + "lineCount": 1 + } + }, + { + "code": "reportAbstractUsage", + "range": { + "startColumn": 21, + "endColumn": 63, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 21, + "endColumn": 63, + "lineCount": 1 + } + }, + { + "code": "reportAbstractUsage", + "range": { + "startColumn": 22, + "endColumn": 65, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 22, + "endColumn": 65, + "lineCount": 1 + } + } + ], + "./examples/00-post_processing/post_processing_plotter_apis.py": [ + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 9, + "endColumn": 29, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 0, + "endColumn": 14, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 11, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 28, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 11, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 51, + "endColumn": 66, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 25, + "endColumn": 39, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 25, + "endColumn": 39, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 25, + "endColumn": 39, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 25, + "endColumn": 39, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 25, + "endColumn": 39, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 25, + "endColumn": 39, + "lineCount": 1 + } + }, + { + "code": "reportAbstractUsage", + "range": { + "startColumn": 17, + "endColumn": 1, + "lineCount": 5 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 11, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 29, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 20, + "endColumn": 47, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 36, + "endColumn": 47, + "lineCount": 1 + } + }, + { + "code": "reportAbstractUsage", + "range": { + "startColumn": 11, + "endColumn": 70, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 11, + "endColumn": 70, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 19, + "lineCount": 1 + } + } + ], + "./examples/00-post_processing/post_processing_plotter_apis_context_manager.py": [ + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 4, + "endColumn": 9, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 9, + "endColumn": 29, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 0, + "endColumn": 14, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 0, + "endColumn": 61, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 29, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 29, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 29, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 29, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 29, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 29, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportAbstractUsage", + "range": { + "startColumn": 21, + "endColumn": 5, + "lineCount": 3 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 52, + "endColumn": 79, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 68, + "endColumn": 79, + "lineCount": 1 + } + }, + { + "code": "reportAbstractUsage", + "range": { + "startColumn": 15, + "endColumn": 51, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 15, + "endColumn": 51, + "lineCount": 1 + } + } + ], + "./src/ansys/fluent/interface/post_objects/check_in_notebook.py": [ + { + "code": "reportMissingImports", + "range": { + "startColumn": 13, + "endColumn": 20, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 28, + "endColumn": 39, + "lineCount": 1 + } + }, + { + "code": "reportUnnecessaryTypeIgnoreComment", + "range": { + "startColumn": 68, + "endColumn": 94, + "lineCount": 1 + } + } + ], + "./src/ansys/fluent/interface/post_objects/meta.py": [ + { + "code": "reportImportCycles", + "range": { + "startColumn": 0, + "endColumn": 0, + "lineCount": 1 + } + }, + { + "code": "reportImportCycles", + "range": { + "startColumn": 0, + "endColumn": 0, + "lineCount": 1 + } + }, + { + "code": "reportImportCycles", + "range": { + "startColumn": 0, + "endColumn": 0, + "lineCount": 1 + } + }, + { + "code": "reportImportCycles", + "range": { + "startColumn": 0, + "endColumn": 0, + "lineCount": 1 + } + }, + { + "code": "reportUnusedImport", + "range": { + "startColumn": 4, + "endColumn": 15, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 33, + "endColumn": 36, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 33, + "endColumn": 36, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 18, + "endColumn": 21, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 16, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 21, + "endColumn": 30, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 33, + "endColumn": 60, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 68, + "endColumn": 71, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 24, + "endColumn": 28, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 30, + "endColumn": 40, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 28, + "endColumn": 42, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 62, + "endColumn": 65, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 63, + "endColumn": 67, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 40, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 45, + "endColumn": 54, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 56, + "endColumn": 70, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 40, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 56, + "endColumn": 70, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 28, + "endColumn": 35, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 37, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 64, + "endColumn": 67, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 36, + "endColumn": 39, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 52, + "endColumn": 66, + "lineCount": 1 + } + }, + { + "code": "reportPossiblyUnboundVariable", + "range": { + "startColumn": 52, + "endColumn": 66, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 26, + "endColumn": 35, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 32, + "endColumn": 35, + "lineCount": 1 + } + }, + { + "code": "reportUnknownLambdaType", + "range": { + "startColumn": 27, + "endColumn": 32, + "lineCount": 1 + } + }, + { + "code": "reportUnknownLambdaType", + "range": { + "startColumn": 34, + "endColumn": 47, + "lineCount": 1 + } + }, + { + "code": "reportUnknownLambdaType", + "range": { + "startColumn": 49, + "endColumn": 58, + "lineCount": 1 + } + }, + { + "code": "reportUnknownLambdaType", + "range": { + "startColumn": 60, + "endColumn": 43, + "lineCount": 3 + } + }, + { + "code": "reportUnknownLambdaType", + "range": { + "startColumn": 36, + "endColumn": 41, + "lineCount": 1 + } + }, + { + "code": "reportUnknownLambdaType", + "range": { + "startColumn": 43, + "endColumn": 76, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 48, + "endColumn": 75, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 58, + "endColumn": 71, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 23, + "endColumn": 31, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 23, + "endColumn": 31, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 16, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 14, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 19, + "endColumn": 27, + "lineCount": 1 + } + }, + { + "code": "reportReturnType", + "range": { + "startColumn": 15, + "endColumn": 21, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 15, + "endColumn": 21, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 26, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 26, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 29, + "endColumn": 37, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 19, + "endColumn": 61, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 32, + "endColumn": 40, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 21, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 29, + "endColumn": 38, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 40, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 24, + "endColumn": 36, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 31, + "endColumn": 48, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 15, + "endColumn": 17, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 24, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 8, + "endColumn": 14, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 37, + "endColumn": 41, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 43, + "endColumn": 46, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 12, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 27, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 27, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 29, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 43, + "endColumn": 47, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 30, + "endColumn": 47, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 25, + "endColumn": 29, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 25, + "endColumn": 29, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 48, + "endColumn": 52, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 16, + "endColumn": 26, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 29, + "endColumn": 39, + "lineCount": 1 + } + }, + { + "code": "reportImplicitOverride", + "range": { + "startColumn": 8, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportInvalidTypeForm", + "range": { + "startColumn": 41, + "endColumn": 50, + "lineCount": 1 + } + }, + { + "code": "reportMissingSuperCall", + "range": { + "startColumn": 8, + "endColumn": 16, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 25, + "endColumn": 31, + "lineCount": 1 + } + }, + { + "code": "reportGeneralTypeIssues", + "range": { + "startColumn": 33, + "endColumn": 51, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 19, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 19, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 48, + "endColumn": 52, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 16, + "endColumn": 26, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 23, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportImplicitOverride", + "range": { + "startColumn": 8, + "endColumn": 16, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 25, + "endColumn": 31, + "lineCount": 1 + } + }, + { + "code": "reportGeneralTypeIssues", + "range": { + "startColumn": 33, + "endColumn": 51, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 22, + "endColumn": 31, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 20, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 47, + "endColumn": 55, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 31, + "endColumn": 39, + "lineCount": 1 + } + }, + { + "code": "reportUninitializedInstanceVariable", + "range": { + "startColumn": 4, + "endColumn": 10, + "lineCount": 1 + } + }, + { + "code": "reportMissingSuperCall", + "range": { + "startColumn": 8, + "endColumn": 16, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 19, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 19, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 48, + "endColumn": 52, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 41, + "endColumn": 45, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 47, + "endColumn": 50, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 16, + "endColumn": 26, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 23, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 35, + "endColumn": 46, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 16, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportReturnType", + "range": { + "startColumn": 15, + "endColumn": 16, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 17, + "endColumn": 22, + "lineCount": 1 + } + }, + { + "code": "reportRedeclaration", + "range": { + "startColumn": 12, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleMethodOverride", + "range": { + "startColumn": 12, + "endColumn": 20, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 37, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 16, + "endColumn": 30, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 23, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 28, + "endColumn": 48, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleMethodOverride", + "range": { + "startColumn": 12, + "endColumn": 20, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 36, + "endColumn": 42, + "lineCount": 1 + } + } + ], + "./src/ansys/fluent/interface/post_objects/post_helper.py": [ + { + "code": "reportImportCycles", + "range": { + "startColumn": 0, + "endColumn": 0, + "lineCount": 1 + } + }, + { + "code": "reportImportCycles", + "range": { + "startColumn": 0, + "endColumn": 0, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 45, + "endColumn": 76, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 12, + "endColumn": 27, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 19, + "endColumn": 63, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 47, + "endColumn": 54, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 33, + "endColumn": 54, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 33, + "endColumn": 54, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 23, + "endColumn": 26, + "lineCount": 1 + } + }, + { + "code": "reportMissingTypeArgument", + "range": { + "startColumn": 29, + "endColumn": 40, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 52, + "endColumn": 58, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 33, + "endColumn": 39, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 19, + "endColumn": 87, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 51, + "endColumn": 86, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 30, + "endColumn": 36, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 60, + "endColumn": 67, + "lineCount": 1 + } + } + ], + "./src/ansys/fluent/interface/post_objects/post_object_definitions.py": [ + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 24, + "endColumn": 55, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleMethodOverride", + "range": { + "startColumn": 10, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 19, + "endColumn": 13, + "lineCount": 3 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 24, + "endColumn": 50, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleMethodOverride", + "range": { + "startColumn": 10, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 19, + "endColumn": 13, + "lineCount": 3 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 24, + "endColumn": 50, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 24, + "endColumn": 55, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleMethodOverride", + "range": { + "startColumn": 10, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 19, + "endColumn": 13, + "lineCount": 3 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 24, + "endColumn": 50, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 29, + "endColumn": 39, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 43, + "endColumn": 53, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 23, + "endColumn": 61, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 21, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 39, + "endColumn": 52, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 27, + "endColumn": 79, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 41, + "endColumn": 46, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 41, + "endColumn": 46, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 41, + "endColumn": 46, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 40, + "endColumn": 53, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 27, + "endColumn": 79, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 41, + "endColumn": 47, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 41, + "endColumn": 47, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 41, + "endColumn": 47, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 42, + "endColumn": 55, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 27, + "endColumn": 71, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 41, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 42, + "endColumn": 55, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 27, + "endColumn": 71, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 41, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportReturnType", + "range": { + "startColumn": 31, + "endColumn": 88, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 42, + "endColumn": 55, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 27, + "endColumn": 71, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 41, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportReturnType", + "range": { + "startColumn": 31, + "endColumn": 88, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 41, + "endColumn": 51, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 23, + "endColumn": 59, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 41, + "endColumn": 52, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 32, + "endColumn": 63, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 45, + "endColumn": 56, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 45, + "endColumn": 56, + "lineCount": 1 + } + }, + { + "code": "reportImplicitOverride", + "range": { + "startColumn": 20, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleVariableOverride", + "range": { + "startColumn": 20, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 20, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 76, + "endColumn": 81, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 24, + "endColumn": 55, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleMethodOverride", + "range": { + "startColumn": 10, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 19, + "endColumn": 13, + "lineCount": 3 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 24, + "endColumn": 50, + "lineCount": 1 + } + }, + { + "code": "reportImplicitOverride", + "range": { + "startColumn": 12, + "endColumn": 17, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleVariableOverride", + "range": { + "startColumn": 12, + "endColumn": 17, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 23, + "endColumn": 63, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 36, + "endColumn": 42, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 48, + "endColumn": 61, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 23, + "endColumn": 64, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 36, + "endColumn": 42, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 49, + "endColumn": 63, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 43, + "endColumn": 57, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleVariableOverride", + "range": { + "startColumn": 20, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 43, + "endColumn": 57, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleVariableOverride", + "range": { + "startColumn": 20, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 24, + "endColumn": 55, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 24, + "endColumn": 55, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleMethodOverride", + "range": { + "startColumn": 10, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 19, + "endColumn": 13, + "lineCount": 3 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 24, + "endColumn": 50, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 23, + "endColumn": 63, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 36, + "endColumn": 42, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 48, + "endColumn": 61, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 23, + "endColumn": 64, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 36, + "endColumn": 42, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 49, + "endColumn": 63, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 43, + "endColumn": 57, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleVariableOverride", + "range": { + "startColumn": 20, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 43, + "endColumn": 57, + "lineCount": 1 + } + }, + { + "code": "reportImplicitOverride", + "range": { + "startColumn": 20, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleVariableOverride", + "range": { + "startColumn": 20, + "endColumn": 25, + "lineCount": 1 + } + } + ], + "./src/ansys/fluent/interface/post_objects/post_objects_container.py": [ + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 14, + "endColumn": 17, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 14, + "endColumn": 17, + "lineCount": 1 + } + }, + { + "code": "reportUnusedVariable", + "range": { + "startColumn": 12, + "endColumn": 16, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 78, + "endColumn": 81, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 46, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 30, + "endColumn": 36, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 30, + "endColumn": 36, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 42, + "endColumn": 48, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 29, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 28, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 41, + "endColumn": 46, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 20, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleVariableOverride", + "range": { + "startColumn": 4, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleVariableOverride", + "range": { + "startColumn": 4, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 20, + "endColumn": 21, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 23, + "endColumn": 24, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 53, + "endColumn": 63, + "lineCount": 1 + } + } + ], + "./src/ansys/fluent/visualization/__init__.py": [ + { + "code": "reportImportCycles", + "range": { + "startColumn": 0, + "endColumn": 0, + "lineCount": 1 + } + }, + { + "code": "reportImportCycles", + "range": { + "startColumn": 0, + "endColumn": 0, + "lineCount": 1 + } + }, + { + "code": "reportImportCycles", + "range": { + "startColumn": 0, + "endColumn": 0, + "lineCount": 1 + } + }, + { + "code": "reportImportCycles", + "range": { + "startColumn": 0, + "endColumn": 0, + "lineCount": 1 + } + } + ], + "./src/ansys/fluent/visualization/config.py": [ + { + "code": "reportImplicitStringConcatenation", + "range": { + "startColumn": 16, + "endColumn": 54, + "lineCount": 2 + } + }, + { + "code": "reportImplicitStringConcatenation", + "range": { + "startColumn": 16, + "endColumn": 57, + "lineCount": 2 + } + }, + { + "code": "reportPropertyTypeMismatch", + "range": { + "startColumn": 24, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportUnnecessaryIsInstance", + "range": { + "startColumn": 11, + "endColumn": 31, + "lineCount": 1 + } + }, + { + "code": "reportImplicitStringConcatenation", + "range": { + "startColumn": 20, + "endColumn": 61, + "lineCount": 2 + } + }, + { + "code": "reportUnnecessaryIsInstance", + "range": { + "startColumn": 11, + "endColumn": 31, + "lineCount": 1 + } + }, + { + "code": "reportImplicitStringConcatenation", + "range": { + "startColumn": 20, + "endColumn": 61, + "lineCount": 2 + } + } + ], + "./src/ansys/fluent/visualization/containers.py": [ + { + "code": "reportIncompatibleVariableOverride", + "range": { + "startColumn": 6, + "endColumn": 10, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleVariableOverride", + "range": { + "startColumn": 6, + "endColumn": 13, + "lineCount": 1 + } + }, + { + "code": "reportPropertyTypeMismatch", + "range": { + "startColumn": 27, + "endColumn": 58, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleVariableOverride", + "range": { + "startColumn": 6, + "endColumn": 13, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleVariableOverride", + "range": { + "startColumn": 6, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportImplicitStringConcatenation", + "range": { + "startColumn": 16, + "endColumn": 80, + "lineCount": 6 + } + }, + { + "code": "reportIncompatibleVariableOverride", + "range": { + "startColumn": 6, + "endColumn": 14, + "lineCount": 1 + } + }, + { + "code": "reportGeneralTypeIssues", + "range": { + "startColumn": 18, + "endColumn": 39, + "lineCount": 1 + } + } + ], + "./src/ansys/fluent/visualization/contour.py": [ + { + "code": "reportDeprecated", + "range": { + "startColumn": 19, + "endColumn": 27, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 27, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 27, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 22, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 24, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 56, + "endColumn": 62, + "lineCount": 1 + } + }, + { + "code": "reportMissingTypeArgument", + "range": { + "startColumn": 64, + "endColumn": 72, + "lineCount": 1 + } + }, + { + "code": "reportInvalidTypeForm", + "range": { + "startColumn": 64, + "endColumn": 72, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 30, + "endColumn": 41, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 19, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 19, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 27, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 27, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 26, + "endColumn": 32, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 21, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 16, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 23, + "endColumn": 68, + "lineCount": 1 + } + }, + { + "code": "reportUnreachable", + "range": { + "startColumn": 16, + "endColumn": 68, + "lineCount": 1 + } + } + ], + "./src/ansys/fluent/visualization/graphics/graphics_objects.py": [ + { + "code": "reportUnusedImport", + "range": { + "startColumn": 62, + "endColumn": 78, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleVariableOverride", + "range": { + "startColumn": 8, + "endColumn": 15, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleVariableOverride", + "range": { + "startColumn": 8, + "endColumn": 15, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleVariableOverride", + "range": { + "startColumn": 8, + "endColumn": 15, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleVariableOverride", + "range": { + "startColumn": 8, + "endColumn": 15, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleVariableOverride", + "range": { + "startColumn": 8, + "endColumn": 15, + "lineCount": 1 + } + } + ], + "./src/ansys/fluent/visualization/graphics/graphics_windows.py": [ + { + "code": "reportUnusedClass", + "range": { + "startColumn": 6, + "endColumn": 21, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 14, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 14, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 25, + "endColumn": 29, + "lineCount": 1 + } + }, + { + "code": "reportMissingTypeArgument", + "range": { + "startColumn": 31, + "endColumn": 36, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 47, + "endColumn": 55, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 47, + "endColumn": 55, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 62, + "endColumn": 75, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 62, + "endColumn": 75, + "lineCount": 1 + } + }, + { + "code": "reportMissingImports", + "range": { + "startColumn": 21, + "endColumn": 38, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 46, + "endColumn": 58, + "lineCount": 1 + } + }, + { + "code": "reportImplicitStringConcatenation", + "range": { + "startColumn": 20, + "endColumn": 38, + "lineCount": 3 + } + }, + { + "code": "reportUnusedExpression", + "range": { + "startColumn": 16, + "endColumn": 57, + "lineCount": 1 + } + } + ], + "./src/ansys/fluent/visualization/graphics/graphics_windows_manager.py": [ + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 28, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 28, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 40, + "endColumn": 55, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 77, + "endColumn": 87, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 29, + "endColumn": 56, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 31, + "endColumn": 39, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 31, + "endColumn": 39, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 28, + "endColumn": 39, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 28, + "endColumn": 39, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 20, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 38, + "endColumn": 46, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 29, + "endColumn": 56, + "lineCount": 1 + } + }, + { + "code": "reportImplicitOverride", + "range": { + "startColumn": 8, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 26, + "endColumn": 29, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 26, + "endColumn": 29, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 55, + "endColumn": 58, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 40, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 40, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 58, + "endColumn": 66, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 58, + "endColumn": 66, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 20, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 33, + "endColumn": 40, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 38, + "endColumn": 45, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 16, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 33, + "endColumn": 37, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 35, + "endColumn": 39, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 29, + "endColumn": 32, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 29, + "endColumn": 32, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 39, + "endColumn": 42, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 29, + "endColumn": 32, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 29, + "endColumn": 32, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 51, + "endColumn": 54, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 8, + "endColumn": 42, + "lineCount": 1 + } + }, + { + "code": "reportOptionalSubscript", + "range": { + "startColumn": 8, + "endColumn": 28, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 27, + "endColumn": 47, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 34, + "endColumn": 37, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 34, + "endColumn": 37, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 16, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 15, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 17, + "endColumn": 29, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 25, + "endColumn": 36, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 24, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 27, + "endColumn": 41, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 33, + "endColumn": 42, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 33, + "endColumn": 42, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 16, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 22, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 16, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 22, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 30, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 30, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 35, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 35, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 13, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 13, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 22, + "lineCount": 1 + } + }, + { + "code": "reportUnusedVariable", + "range": { + "startColumn": 12, + "endColumn": 22, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 24, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 24, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 20, + "endColumn": 29, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 31, + "endColumn": 41, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 24, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 35, + "endColumn": 45, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 24, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 43, + "endColumn": 52, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 48, + "endColumn": 57, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 59, + "endColumn": 69, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 35, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 46, + "endColumn": 57, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 56, + "endColumn": 65, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 67, + "endColumn": 77, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 16, + "endColumn": 30, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 16, + "endColumn": 22, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 24, + "endColumn": 48, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 24, + "endColumn": 48, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 16, + "endColumn": 29, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 20, + "endColumn": 26, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 23, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 22, + "lineCount": 1 + } + }, + { + "code": "reportPossiblyUnboundVariable", + "range": { + "startColumn": 35, + "endColumn": 50, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 16, + "endColumn": 36, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 33, + "endColumn": 36, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 33, + "endColumn": 36, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 38, + "endColumn": 46, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 38, + "endColumn": 46, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 13, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 13, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 22, + "lineCount": 1 + } + }, + { + "code": "reportUnusedVariable", + "range": { + "startColumn": 12, + "endColumn": 22, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 24, + "endColumn": 36, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 31, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 16, + "endColumn": 37, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 22, + "endColumn": 40, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 22, + "lineCount": 1 + } + }, + { + "code": "reportPossiblyUnboundVariable", + "range": { + "startColumn": 35, + "endColumn": 50, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 24, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 31, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 31, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 36, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 36, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 13, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 13, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 20, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 14, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 21, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 22, + "lineCount": 1 + } + }, + { + "code": "reportUnusedVariable", + "range": { + "startColumn": 12, + "endColumn": 22, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 24, + "endColumn": 36, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 24, + "endColumn": 36, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 43, + "endColumn": 55, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 49, + "endColumn": 61, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 63, + "endColumn": 74, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 48, + "endColumn": 60, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 62, + "endColumn": 73, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 16, + "endColumn": 30, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 36, + "endColumn": 41, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 34, + "endColumn": 58, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 27, + "endColumn": 55, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 34, + "endColumn": 54, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 34, + "endColumn": 54, + "lineCount": 1 + } + }, + { + "code": "reportIndexIssue", + "range": { + "startColumn": 34, + "endColumn": 47, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 34, + "endColumn": 54, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 28, + "endColumn": 41, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 58, + "endColumn": 69, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 40, + "endColumn": 45, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 38, + "endColumn": 62, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 32, + "endColumn": 42, + "lineCount": 1 + } + }, + { + "code": "reportPossiblyUnboundVariable", + "range": { + "startColumn": 55, + "endColumn": 70, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 32, + "endColumn": 60, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 39, + "endColumn": 59, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 39, + "endColumn": 59, + "lineCount": 1 + } + }, + { + "code": "reportIndexIssue", + "range": { + "startColumn": 39, + "endColumn": 52, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 39, + "endColumn": 59, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 35, + "endColumn": 63, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 42, + "endColumn": 62, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 42, + "endColumn": 62, + "lineCount": 1 + } + }, + { + "code": "reportIndexIssue", + "range": { + "startColumn": 42, + "endColumn": 55, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 42, + "endColumn": 62, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 32, + "endColumn": 42, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 58, + "endColumn": 65, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 24, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportPossiblyUnboundVariable", + "range": { + "startColumn": 47, + "endColumn": 62, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 16, + "endColumn": 29, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 24, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 24, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportPossiblyUnboundVariable", + "range": { + "startColumn": 47, + "endColumn": 62, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 24, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportPossiblyUnboundVariable", + "range": { + "startColumn": 47, + "endColumn": 62, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 31, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 31, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 36, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 36, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 12, + "endColumn": 15, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 28, + "endColumn": 31, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 28, + "endColumn": 31, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 33, + "endColumn": 41, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 33, + "endColumn": 41, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 22, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 24, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 24, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 43, + "endColumn": 52, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 24, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 22, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 31, + "endColumn": 39, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 31, + "endColumn": 39, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 36, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 36, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 65, + "endColumn": 82, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 65, + "endColumn": 82, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 53, + "endColumn": 70, + "lineCount": 1 + } + }, + { + "code": "reportGeneralTypeIssues", + "range": { + "startColumn": 33, + "endColumn": 51, + "lineCount": 1 + } + }, + { + "code": "reportInvalidTypeArguments", + "range": { + "startColumn": 33, + "endColumn": 51, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 49, + "endColumn": 53, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 42, + "endColumn": 46, + "lineCount": 1 + } + }, + { + "code": "reportReturnType", + "range": { + "startColumn": 19, + "endColumn": 58, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 19, + "endColumn": 58, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 19, + "endColumn": 65, + "lineCount": 1 + } + }, + { + "code": "reportUnnecessaryIsInstance", + "range": { + "startColumn": 15, + "endColumn": 47, + "lineCount": 1 + } + }, + { + "code": "reportUnreachable", + "range": { + "startColumn": 12, + "endColumn": 70, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 31, + "endColumn": 46, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 31, + "endColumn": 46, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 38, + "endColumn": 54, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 38, + "endColumn": 54, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 32, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 8, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportUnusedParameter", + "range": { + "startColumn": 8, + "endColumn": 15, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 16, + "endColumn": 22, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 25, + "endColumn": 38, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 8, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 16, + "endColumn": 22, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 8, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 16, + "endColumn": 22, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 8, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 20, + "endColumn": 29, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 24, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 35, + "endColumn": 41, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 35, + "endColumn": 39, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleMethodOverride", + "range": { + "startColumn": 6, + "endColumn": 35, + "lineCount": 1 + } + }, + { + "code": "reportImplicitOverride", + "range": { + "startColumn": 8, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportMissingTypeArgument", + "range": { + "startColumn": 14, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleMethodOverride", + "range": { + "startColumn": 8, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportImplicitOverride", + "range": { + "startColumn": 8, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 60, + "endColumn": 70, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 72, + "endColumn": 79, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 28, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 28, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 46, + "endColumn": 55, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 46, + "endColumn": 55, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 43, + "endColumn": 59, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 44, + "endColumn": 53, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 19, + "endColumn": 29, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 19, + "endColumn": 26, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 19, + "endColumn": 32, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportMissingTypeArgument", + "range": { + "startColumn": 14, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 16, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 8, + "endColumn": 16, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 14, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 47, + "endColumn": 51, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 53, + "endColumn": 57, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 68, + "endColumn": 76, + "lineCount": 1 + } + }, + { + "code": "reportReturnType", + "range": { + "startColumn": 15, + "endColumn": 21, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 15, + "endColumn": 21, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleMethodOverride", + "range": { + "startColumn": 6, + "endColumn": 32, + "lineCount": 1 + } + }, + { + "code": "reportImplicitOverride", + "range": { + "startColumn": 8, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportMissingTypeArgument", + "range": { + "startColumn": 14, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleMethodOverride", + "range": { + "startColumn": 8, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportImplicitOverride", + "range": { + "startColumn": 8, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 68, + "endColumn": 78, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 80, + "endColumn": 87, + "lineCount": 1 + } + }, + { + "code": "reportUnnecessaryComparison", + "range": { + "startColumn": 56, + "endColumn": 73, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 32, + "endColumn": 81, + "lineCount": 1 + } + }, + { + "code": "reportUnnecessaryComparison", + "range": { + "startColumn": 15, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportIndexIssue", + "range": { + "startColumn": 16, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportUnusedParameter", + "range": { + "startColumn": 28, + "endColumn": 37, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 20, + "endColumn": 26, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 20, + "endColumn": 27, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 20, + "endColumn": 27, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 69, + "endColumn": 79, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 44, + "endColumn": 47, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 32, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 27, + "endColumn": 37, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 27, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 27, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 27, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 16, + "endColumn": 22, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 20, + "endColumn": 27, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 16, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 8, + "endColumn": 16, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 8, + "endColumn": 15, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 8, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 32, + "endColumn": 35, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 20, + "endColumn": 27, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 8, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 26, + "endColumn": 30, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 26, + "endColumn": 30, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 44, + "endColumn": 48, + "lineCount": 1 + } + }, + { + "code": "reportImplicitOverride", + "range": { + "startColumn": 8, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 26, + "endColumn": 30, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 26, + "endColumn": 30, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 32, + "endColumn": 37, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 32, + "endColumn": 37, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 41, + "endColumn": 45, + "lineCount": 1 + } + } + ], + "./src/ansys/fluent/visualization/graphics/pyvista/renderer.py": [ + { + "code": "reportMissingImports", + "range": { + "startColumn": 17, + "endColumn": 26, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 34, + "endColumn": 51, + "lineCount": 1 + } + }, + { + "code": "reportUnnecessaryTypeIgnoreComment", + "range": { + "startColumn": 71, + "endColumn": 93, + "lineCount": 1 + } + }, + { + "code": "reportUnnecessaryCast", + "range": { + "startColumn": 22, + "endColumn": 52, + "lineCount": 1 + } + }, + { + "code": "reportUnnecessaryCast", + "range": { + "startColumn": 18, + "endColumn": 48, + "lineCount": 1 + } + }, + { + "code": "reportUnnecessaryTypeIgnoreComment", + "range": { + "startColumn": 81, + "endColumn": 90, + "lineCount": 1 + } + }, + { + "code": "reportUnnecessaryTypeIgnoreComment", + "range": { + "startColumn": 99, + "endColumn": 108, + "lineCount": 1 + } + } + ], + "./src/ansys/fluent/visualization/graphics/single_qt_windows.py": [ + { + "code": "reportMissingImports", + "range": { + "startColumn": 5, + "endColumn": 22, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 4, + "endColumn": 16, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 4, + "endColumn": 15, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 4, + "endColumn": 14, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 4, + "endColumn": 15, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 4, + "endColumn": 11, + "lineCount": 1 + } + }, + { + "code": "reportUntypedBaseClass", + "range": { + "startColumn": 17, + "endColumn": 28, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 14, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 20, + "endColumn": 41, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 21, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 23, + "endColumn": 30, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 23, + "endColumn": 30, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 32, + "endColumn": 37, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 11, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 14, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 29, + "endColumn": 36, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 25, + "endColumn": 30, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 25, + "endColumn": 30, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 19, + "lineCount": 1 + } + } + ], + "./src/ansys/fluent/visualization/matplotlib/__init__.py": [ + { + "code": "reportUnusedImport", + "range": { + "startColumn": 63, + "endColumn": 68, + "lineCount": 1 + } + } + ], + "./src/ansys/fluent/visualization/plotter/matplotlib/renderer.py": [ + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 26, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportMissingTypeArgument", + "range": { + "startColumn": 36, + "endColumn": 41, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 9, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 9, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 15, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 15, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 15, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleMethodOverride", + "range": { + "startColumn": 8, + "endColumn": 14, + "lineCount": 1 + } + }, + { + "code": "reportImplicitOverride", + "range": { + "startColumn": 8, + "endColumn": 14, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 21, + "endColumn": 27, + "lineCount": 1 + } + }, + { + "code": "reportMissingTypeArgument", + "range": { + "startColumn": 39, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 16, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 40, + "endColumn": 67, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 16, + "endColumn": 20, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 24, + "endColumn": 29, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 24, + "endColumn": 35, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 46, + "endColumn": 68, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 24, + "endColumn": 35, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 46, + "endColumn": 68, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 24, + "endColumn": 35, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 46, + "endColumn": 68, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 24, + "endColumn": 35, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 46, + "endColumn": 68, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 32, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 45, + "endColumn": 56, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 32, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 45, + "endColumn": 56, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 32, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 45, + "endColumn": 56, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 32, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 45, + "endColumn": 56, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 39, + "endColumn": 50, + "lineCount": 1 + } + }, + { + "code": "reportOptionalSubscript", + "range": { + "startColumn": 24, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 24, + "endColumn": 37, + "lineCount": 1 + } + }, + { + "code": "reportOptionalSubscript", + "range": { + "startColumn": 24, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 24, + "endColumn": 37, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 47, + "endColumn": 68, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 43, + "endColumn": 55, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 29, + "endColumn": 35, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 44, + "endColumn": 60, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 30, + "endColumn": 41, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 31, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 31, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 28, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 32, + "endColumn": 60, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 32, + "endColumn": 60, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 45, + "endColumn": 56, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 58, + "endColumn": 69, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 24, + "endColumn": 31, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 28, + "endColumn": 55, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 57, + "endColumn": 84, + "lineCount": 1 + } + }, + { + "code": "reportImplicitOverride", + "range": { + "startColumn": 8, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportImplicitOverride", + "range": { + "startColumn": 8, + "endColumn": 13, + "lineCount": 1 + } + }, + { + "code": "reportImplicitOverride", + "range": { + "startColumn": 8, + "endColumn": 20, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 29, + "endColumn": 39, + "lineCount": 1 + } + }, + { + "code": "reportMissingTypeArgument", + "range": { + "startColumn": 41, + "endColumn": 45, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 48, + "endColumn": 60, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 22, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 22, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 17, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 8, + "endColumn": 17, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportMissingTypeArgument", + "range": { + "startColumn": 14, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 25, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 83, + "endColumn": 87, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 16, + "endColumn": 20, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 24, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 44, + "endColumn": 54, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 24, + "endColumn": 28, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 42, + "endColumn": 46, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 43, + "endColumn": 55, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleMethodOverride", + "range": { + "startColumn": 8, + "endColumn": 16, + "lineCount": 1 + } + }, + { + "code": "reportImplicitOverride", + "range": { + "startColumn": 8, + "endColumn": 16, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 23, + "endColumn": 27, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 23, + "endColumn": 27, + "lineCount": 1 + } + } + ], + "./src/ansys/fluent/visualization/plotter/plotter_objects.py": [ + { + "code": "reportUnusedImport", + "range": { + "startColumn": 4, + "endColumn": 15, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 15, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 8, + "endColumn": 15, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 12, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportImplicitAbstractClass", + "range": { + "startColumn": 6, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleMethodOverride", + "range": { + "startColumn": 8, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportImplicitAbstractClass", + "range": { + "startColumn": 6, + "endColumn": 17, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleMethodOverride", + "range": { + "startColumn": 8, + "endColumn": 12, + "lineCount": 1 + } + } + ], + "./src/ansys/fluent/visualization/plotter/plotter_windows.py": [ + { + "code": "reportUnusedClass", + "range": { + "startColumn": 6, + "endColumn": 20, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 23, + "endColumn": 32, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 23, + "endColumn": 32, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 34, + "endColumn": 38, + "lineCount": 1 + } + }, + { + "code": "reportMissingTypeArgument", + "range": { + "startColumn": 40, + "endColumn": 45, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 56, + "endColumn": 64, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 56, + "endColumn": 64, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 71, + "endColumn": 80, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 71, + "endColumn": 80, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 22, + "endColumn": 31, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 59, + "endColumn": 67, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 43, + "endColumn": 50, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 24, + "endColumn": 30, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 24, + "endColumn": 30, + "lineCount": 1 + } + }, + { + "code": "reportUnusedParameter", + "range": { + "startColumn": 24, + "endColumn": 30, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 32, + "endColumn": 40, + "lineCount": 1 + } + }, + { + "code": "reportUnusedParameter", + "range": { + "startColumn": 32, + "endColumn": 40, + "lineCount": 1 + } + }, + { + "code": "reportMissingTypeArgument", + "range": { + "startColumn": 42, + "endColumn": 47, + "lineCount": 1 + } + }, + { + "code": "reportUnusedParameter", + "range": { + "startColumn": 58, + "endColumn": 63, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 24, + "endColumn": 30, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 20, + "lineCount": 1 + } + }, + { + "code": "reportOptionalIterable", + "range": { + "startColumn": 24, + "endColumn": 39, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 44, + "endColumn": 65, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 25, + "endColumn": 52, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 20, + "endColumn": 66, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 32, + "endColumn": 39, + "lineCount": 1 + } + }, + { + "code": "reportUnusedParameter", + "range": { + "startColumn": 8, + "endColumn": 15, + "lineCount": 1 + } + } + ], + "./src/ansys/fluent/visualization/plotter/plotter_windows_manager.py": [ + { + "code": "reportDeprecated", + "range": { + "startColumn": 19, + "endColumn": 24, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 17, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 8, + "endColumn": 17, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 14, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 8, + "endColumn": 14, + "lineCount": 1 + } + }, + { + "code": "reportCallInDefaultInitializer", + "range": { + "startColumn": 15, + "endColumn": 17, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 8, + "endColumn": 13, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 8, + "endColumn": 14, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 8, + "endColumn": 14, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 8, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 12, + "endColumn": 21, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 23, + "endColumn": 29, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 59, + "endColumn": 63, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 41, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 21, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 21, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportMissingTypeArgument", + "range": { + "startColumn": 14, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 24, + "endColumn": 28, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 46, + "endColumn": 53, + "lineCount": 1 + } + }, + { + "code": "reportMissingTypeArgument", + "range": { + "startColumn": 37, + "endColumn": 41, + "lineCount": 1 + } + }, + { + "code": "reportMissingTypeArgument", + "range": { + "startColumn": 24, + "endColumn": 28, + "lineCount": 1 + } + }, + { + "code": "reportImplicitOverride", + "range": { + "startColumn": 8, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 19, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 19, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 32, + "endColumn": 40, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 32, + "endColumn": 40, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 49, + "endColumn": 53, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 60, + "endColumn": 74, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 60, + "endColumn": 74, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 34, + "endColumn": 50, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 21, + "lineCount": 1 + } + }, + { + "code": "reportOptionalSubscript", + "range": { + "startColumn": 32, + "endColumn": 41, + "lineCount": 1 + } + }, + { + "code": "reportOptionalSubscript", + "range": { + "startColumn": 38, + "endColumn": 47, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 28, + "endColumn": 39, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 28, + "endColumn": 39, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 20, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 34, + "endColumn": 50, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 21, + "lineCount": 1 + } + }, + { + "code": "reportOptionalSubscript", + "range": { + "startColumn": 32, + "endColumn": 41, + "lineCount": 1 + } + }, + { + "code": "reportOptionalSubscript", + "range": { + "startColumn": 38, + "endColumn": 47, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 27, + "endColumn": 41, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 27, + "endColumn": 41, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 35, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 39, + "endColumn": 46, + "lineCount": 1 + } + }, + { + "code": "reportDeprecated", + "range": { + "startColumn": 48, + "endColumn": 53, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 78, + "endColumn": 85, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 46, + "endColumn": 53, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 27, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 40, + "endColumn": 47, + "lineCount": 1 + } + }, + { + "code": "reportDeprecated", + "range": { + "startColumn": 49, + "endColumn": 54, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 79, + "endColumn": 86, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 46, + "endColumn": 53, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 16, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 33, + "endColumn": 41, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 16, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 44, + "endColumn": 52, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 21, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 25, + "endColumn": 36, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 27, + "endColumn": 41, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 15, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportImplicitOverride", + "range": { + "startColumn": 8, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportMissingTypeArgument", + "range": { + "startColumn": 14, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleMethodOverride", + "range": { + "startColumn": 8, + "endColumn": 29, + "lineCount": 1 + } + }, + { + "code": "reportImplicitOverride", + "range": { + "startColumn": 8, + "endColumn": 29, + "lineCount": 1 + } + }, + { + "code": "reportUnnecessaryIsInstance", + "range": { + "startColumn": 15, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportUnreachable", + "range": { + "startColumn": 12, + "endColumn": 57, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleMethodOverride", + "range": { + "startColumn": 8, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportImplicitOverride", + "range": { + "startColumn": 8, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 8, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 16, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 8, + "endColumn": 16, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 22, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 8, + "endColumn": 22, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 8, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportUnnecessaryIsInstance", + "range": { + "startColumn": 15, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportUnreachable", + "range": { + "startColumn": 12, + "endColumn": 60, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 14, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 26, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 28, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 28, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 46, + "endColumn": 55, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 46, + "endColumn": 55, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 32, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 14, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 40, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 72, + "endColumn": 81, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 28, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 29, + "endColumn": 45, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 14, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 15, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportImplicitOverride", + "range": { + "startColumn": 8, + "endColumn": 20, + "lineCount": 1 + } + }, + { + "code": "reportImplicitOverride", + "range": { + "startColumn": 8, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 8, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportImplicitOverride", + "range": { + "startColumn": 8, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 8, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportImplicitOverride", + "range": { + "startColumn": 8, + "endColumn": 21, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 8, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 20, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportMissingTypeArgument", + "range": { + "startColumn": 14, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 16, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 8, + "endColumn": 16, + "lineCount": 1 + } + }, + { + "code": "reportDeprecated", + "range": { + "startColumn": 9, + "endColumn": 14, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 16, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 61, + "endColumn": 69, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 16, + "endColumn": 32, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 8, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 72, + "endColumn": 79, + "lineCount": 1 + } + } + ], + "./src/ansys/fluent/visualization/plotter/pyvista/renderer.py": [ + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportMissingTypeArgument", + "range": { + "startColumn": 14, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportIncompatibleMethodOverride", + "range": { + "startColumn": 8, + "endColumn": 14, + "lineCount": 1 + } + }, + { + "code": "reportImplicitOverride", + "range": { + "startColumn": 8, + "endColumn": 14, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 21, + "endColumn": 27, + "lineCount": 1 + } + }, + { + "code": "reportMissingTypeArgument", + "range": { + "startColumn": 39, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 65, + "endColumn": 75, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 16, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 36, + "endColumn": 63, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 16, + "endColumn": 20, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 20, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 20, + "endColumn": 31, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 42, + "endColumn": 64, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 20, + "endColumn": 31, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 42, + "endColumn": 64, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 20, + "endColumn": 31, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 42, + "endColumn": 64, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 20, + "endColumn": 31, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 42, + "endColumn": 64, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 28, + "endColumn": 39, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 41, + "endColumn": 52, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 28, + "endColumn": 39, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 41, + "endColumn": 52, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 28, + "endColumn": 39, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 41, + "endColumn": 52, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 28, + "endColumn": 39, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 41, + "endColumn": 52, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 33, + "endColumn": 40, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 24, + "endColumn": 48, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 50, + "endColumn": 74, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 33, + "endColumn": 42, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 43, + "endColumn": 53, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 46, + "endColumn": 58, + "lineCount": 1 + } + }, + { + "code": "reportUnusedVariable", + "range": { + "startColumn": 20, + "endColumn": 24, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 24, + "endColumn": 52, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 24, + "endColumn": 52, + "lineCount": 1 + } + }, + { + "code": "reportImplicitOverride", + "range": { + "startColumn": 8, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportImplicitOverride", + "range": { + "startColumn": 8, + "endColumn": 13, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 21, + "endColumn": 26, + "lineCount": 1 + } + }, + { + "code": "reportImplicitOverride", + "range": { + "startColumn": 8, + "endColumn": 20, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 21, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 29, + "endColumn": 39, + "lineCount": 1 + } + }, + { + "code": "reportMissingTypeArgument", + "range": { + "startColumn": 41, + "endColumn": 45, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 48, + "endColumn": 60, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 22, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 22, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 30, + "endColumn": 34, + "lineCount": 1 + } + } + ], + "./src/ansys/fluent/visualization/post_data_extractor.py": [ + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 26, + "endColumn": 30, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 26, + "endColumn": 30, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 34, + "endColumn": 40, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 34, + "endColumn": 40, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 19, + "endColumn": 76, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 61, + "endColumn": 65, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 69, + "endColumn": 75, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 19, + "endColumn": 79, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 64, + "endColumn": 68, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 72, + "endColumn": 78, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 19, + "endColumn": 79, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 64, + "endColumn": 68, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 72, + "endColumn": 78, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 19, + "endColumn": 78, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 63, + "endColumn": 67, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 71, + "endColumn": 77, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 19, + "endColumn": 81, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 66, + "endColumn": 70, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 74, + "endColumn": 80, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 24, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 25, + "endColumn": 28, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 25, + "endColumn": 28, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 31, + "endColumn": 35, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 31, + "endColumn": 35, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 39, + "endColumn": 45, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 39, + "endColumn": 45, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 15, + "endColumn": 28, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 27, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 34, + "endColumn": 37, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 34, + "endColumn": 37, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 40, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 40, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnusedParameter", + "range": { + "startColumn": 40, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 48, + "endColumn": 54, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 48, + "endColumn": 54, + "lineCount": 1 + } + }, + { + "code": "reportUnusedParameter", + "range": { + "startColumn": 48, + "endColumn": 54, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 20, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 24, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 52, + "endColumn": 59, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 16, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 24, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 49, + "endColumn": 53, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 15, + "endColumn": 27, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 27, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 28, + "endColumn": 31, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 28, + "endColumn": 31, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 34, + "endColumn": 38, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 34, + "endColumn": 38, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 42, + "endColumn": 48, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 42, + "endColumn": 48, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 13, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 29, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 24, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 13, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 15, + "endColumn": 16, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 20, + "endColumn": 21, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 23, + "endColumn": 28, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 15, + "endColumn": 27, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 29, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 30, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 30, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 36, + "endColumn": 40, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 36, + "endColumn": 40, + "lineCount": 1 + } + }, + { + "code": "reportUnusedParameter", + "range": { + "startColumn": 36, + "endColumn": 40, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 44, + "endColumn": 50, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 44, + "endColumn": 50, + "lineCount": 1 + } + }, + { + "code": "reportUnusedParameter", + "range": { + "startColumn": 44, + "endColumn": 50, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 13, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 26, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 15, + "endColumn": 29, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 26, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 33, + "endColumn": 36, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 33, + "endColumn": 36, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 39, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 39, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 47, + "endColumn": 53, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 47, + "endColumn": 53, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 13, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 21, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 24, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 24, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 24, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 16, + "endColumn": 17, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 19, + "endColumn": 20, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 24, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 27, + "endColumn": 32, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 24, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 27, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 24, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 15, + "endColumn": 27, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 19, + "endColumn": 57, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 22, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 29, + "endColumn": 32, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 29, + "endColumn": 32, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 13, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 24, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 16, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 21, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 16, + "endColumn": 20, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 28, + "endColumn": 63, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 65, + "endColumn": 79, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 16, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 16, + "endColumn": 17, + "lineCount": 5 + } + }, + { + "code": "reportUnknownLambdaType", + "range": { + "startColumn": 23, + "endColumn": 41, + "lineCount": 1 + } + }, + { + "code": "reportUnknownLambdaType", + "range": { + "startColumn": 43, + "endColumn": 50, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 27, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 59, + "endColumn": 61, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 16, + "endColumn": 17, + "lineCount": 10 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 24, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 45, + "endColumn": 63, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 24, + "endColumn": 74, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 28, + "endColumn": 63, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 65, + "endColumn": 73, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 24, + "endColumn": 32, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 27, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 20, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 22, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 24, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 20, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 16, + "endColumn": 73, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 16, + "endColumn": 32, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 15, + "endColumn": 28, + "lineCount": 1 + } + } + ], + "./src/ansys/fluent/visualization/pyvista/__init__.py": [ + { + "code": "reportUnusedImport", + "range": { + "startColumn": 65, + "endColumn": 73, + "lineCount": 1 + } + } + ], + "./src/ansys/fluent/visualization/renderer.py": [ + { + "code": "reportUnusedImport", + "range": { + "startColumn": 4, + "endColumn": 16, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 15, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 47, + "endColumn": 70, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 47, + "endColumn": 70, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 22, + "endColumn": 26, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 22, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 16, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 20, + "endColumn": 42, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 35, + "endColumn": 42, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 31, + "endColumn": 38, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 39, + "endColumn": 46, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 19, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 34, + "endColumn": 41, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 42, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 15, + "endColumn": 37, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 30, + "endColumn": 37, + "lineCount": 1 + } + }, + { + "code": "reportImplicitStringConcatenation", + "range": { + "startColumn": 16, + "endColumn": 57, + "lineCount": 2 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 27, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 27, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportOptionalMemberAccess", + "range": { + "startColumn": 27, + "endColumn": 32, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 31, + "endColumn": 37, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 31, + "endColumn": 37, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 16, + "endColumn": 21, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 16, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 30, + "endColumn": 37, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 30, + "endColumn": 37, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 39, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 39, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportUnusedParameter", + "range": { + "startColumn": 39, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 33, + "endColumn": 43, + "lineCount": 1 + } + } + ], + "./src/ansys/fluent/visualization/visualization_windows_manager.py": [ + { + "code": "reportInvalidAbstractMethod", + "range": { + "startColumn": 8, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportCallInDefaultInitializer", + "range": { + "startColumn": 39, + "endColumn": 41, + "lineCount": 1 + } + }, + { + "code": "reportCallInDefaultInitializer", + "range": { + "startColumn": 43, + "endColumn": 45, + "lineCount": 1 + } + }, + { + "code": "reportCallInDefaultInitializer", + "range": { + "startColumn": 43, + "endColumn": 45, + "lineCount": 1 + } + } + ], + "./tests/test_post.py": [ + { + "code": "reportMissingImports", + "range": { + "startColumn": 7, + "endColumn": 13, + "lineCount": 1 + } + }, + { + "code": "reportUntypedFunctionDecorator", + "range": { + "startColumn": 1, + "endColumn": 29, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 26, + "endColumn": 32, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 26, + "endColumn": 32, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 23, + "endColumn": 35, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 23, + "endColumn": 35, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 37, + "endColumn": 50, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 37, + "endColumn": 50, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 8, + "endColumn": 24, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 8, + "endColumn": 21, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 8, + "endColumn": 30, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 8, + "endColumn": 28, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportMissingTypeArgument", + "range": { + "startColumn": 38, + "endColumn": 42, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 24, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 26, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 16, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 16, + "endColumn": 30, + "lineCount": 1 + } + }, + { + "code": "reportPossiblyUnboundVariable", + "range": { + "startColumn": 44, + "endColumn": 50, + "lineCount": 1 + } + }, + { + "code": "reportPossiblyUnboundVariable", + "range": { + "startColumn": 44, + "endColumn": 50, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 16, + "endColumn": 24, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 20, + "endColumn": 27, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 20, + "endColumn": 36, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 58, + "endColumn": 65, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 44, + "endColumn": 83, + "lineCount": 1 + } + }, + { + "code": "reportPossiblyUnboundVariable", + "range": { + "startColumn": 67, + "endColumn": 73, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 15, + "endColumn": 21, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 23, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 23, + "endColumn": 34, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 36, + "endColumn": 54, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 56, + "endColumn": 78, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 24, + "lineCount": 1 + } + }, + { + "code": "reportMissingTypeArgument", + "range": { + "startColumn": 9, + "endColumn": 13, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 21, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 19, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 12, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 26, + "endColumn": 38, + "lineCount": 1 + } + }, + { + "code": "reportUndefinedVariable", + "range": { + "startColumn": 39, + "endColumn": 59, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 15, + "endColumn": 9, + "lineCount": 6 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 16, + "endColumn": 45, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 16, + "endColumn": 26, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 27, + "endColumn": 38, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 27, + "endColumn": 38, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 19, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 19, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportUnusedParameter", + "range": { + "startColumn": 19, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 27, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 27, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportUnusedParameter", + "range": { + "startColumn": 27, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 29, + "endColumn": 69, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 21, + "lineCount": 1 + } + }, + { + "code": "reportMissingTypeArgument", + "range": { + "startColumn": 31, + "endColumn": 35, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 15, + "endColumn": 55, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 8, + "endColumn": 16, + "lineCount": 1 + } + }, + { + "code": "reportMissingTypeArgument", + "range": { + "startColumn": 26, + "endColumn": 30, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 15, + "endColumn": 50, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 27, + "endColumn": 30, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 27, + "endColumn": 30, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 23, + "endColumn": 26, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 23, + "endColumn": 26, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 23, + "endColumn": 26, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 23, + "endColumn": 26, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 69, + "endColumn": 82, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 4, + "endColumn": 15, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 42, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportUnusedVariable", + "range": { + "startColumn": 42, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 45, + "endColumn": 46, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 4, + "endColumn": 17, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 48, + "endColumn": 54, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 56, + "endColumn": 80, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 4, + "endColumn": 5, + "lineCount": 6 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 8, + "endColumn": 24, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 8, + "endColumn": 30, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 8, + "endColumn": 21, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 42, + "endColumn": 57, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 59, + "endColumn": 72, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 42, + "endColumn": 57, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 59, + "endColumn": 72, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 4, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportIndexIssue", + "range": { + "startColumn": 15, + "endColumn": 21, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 4, + "endColumn": 12, + "lineCount": 1 + } + }, + { + "code": "reportIndexIssue", + "range": { + "startColumn": 15, + "endColumn": 21, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 4, + "endColumn": 13, + "lineCount": 1 + } + }, + { + "code": "reportIndexIssue", + "range": { + "startColumn": 16, + "endColumn": 22, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 4, + "endColumn": 16, + "lineCount": 1 + } + }, + { + "code": "reportIndexIssue", + "range": { + "startColumn": 19, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 34, + "endColumn": 42, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 44, + "endColumn": 84, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 68, + "endColumn": 81, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 32, + "endColumn": 41, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 15, + "endColumn": 23, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 32, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 42, + "endColumn": 56, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 4, + "endColumn": 43, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 20, + "endColumn": 30, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 21, + "endColumn": 55, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 36, + "endColumn": 50, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 27, + "endColumn": 52, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 11, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 11, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 11, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 11, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 11, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportUnreachable", + "range": { + "startColumn": 8, + "endColumn": 9, + "lineCount": 4 + } + }, + { + "code": "reportImplicitStringConcatenation", + "range": { + "startColumn": 12, + "endColumn": 76, + "lineCount": 2 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 51, + "endColumn": 79, + "lineCount": 1 + } + }, + { + "code": "reportUnreachable", + "range": { + "startColumn": 8, + "endColumn": 9, + "lineCount": 4 + } + }, + { + "code": "reportImplicitStringConcatenation", + "range": { + "startColumn": 12, + "endColumn": 76, + "lineCount": 2 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 21, + "endColumn": 55, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 68, + "endColumn": 81, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 24, + "endColumn": 37, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 69, + "endColumn": 82, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 69, + "endColumn": 82, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 68, + "endColumn": 81, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 46, + "endColumn": 74, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 53, + "endColumn": 79, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 25, + "endColumn": 63, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 44, + "endColumn": 58, + "lineCount": 1 + } + } + ], + "./tests/test_visualization.py": [ + { + "code": "reportMissingImports", + "range": { + "startColumn": 7, + "endColumn": 13, + "lineCount": 1 + } + }, + { + "code": "reportDuplicateImport", + "range": { + "startColumn": 0, + "endColumn": 13, + "lineCount": 1 + } + }, + { + "code": "reportMissingImports", + "range": { + "startColumn": 7, + "endColumn": 13, + "lineCount": 1 + } + }, + { + "code": "reportUntypedFunctionDecorator", + "range": { + "startColumn": 1, + "endColumn": 31, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 4, + "endColumn": 22, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 4, + "endColumn": 10, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 4, + "endColumn": 10, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 38, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 38, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 38, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 38, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 38, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 38, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 38, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 38, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 38, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 38, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 38, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 38, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 38, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 38, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 38, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 38, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 38, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 38, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 38, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 38, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 38, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 38, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 38, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 38, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 38, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 38, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 38, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 38, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportUntypedFunctionDecorator", + "range": { + "startColumn": 1, + "endColumn": 31, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 4, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 50, + "endColumn": 68, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 50, + "endColumn": 68, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 4, + "endColumn": 10, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 11, + "endColumn": 17, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 4, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 4, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 14, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 40, + "endColumn": 59, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 27, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 4, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 4, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 14, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 40, + "endColumn": 59, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 27, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 27, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 4, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 4, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 14, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 40, + "endColumn": 59, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 39, + "endColumn": 45, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 43, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 4, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 4, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 14, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 40, + "endColumn": 59, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 19, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 4, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 4, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 14, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 40, + "endColumn": 59, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 19, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 4, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 4, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 14, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 40, + "endColumn": 59, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 19, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 4, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 4, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 14, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 36, + "endColumn": 55, + "lineCount": 1 + } + }, + { + "code": "reportAbstractUsage", + "range": { + "startColumn": 25, + "endColumn": 9, + "lineCount": 5 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 19, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 4, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 4, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 14, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 36, + "endColumn": 55, + "lineCount": 1 + } + }, + { + "code": "reportAbstractUsage", + "range": { + "startColumn": 25, + "endColumn": 9, + "lineCount": 5 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 19, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 4, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 4, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 8, + "endColumn": 14, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 36, + "endColumn": 55, + "lineCount": 1 + } + }, + { + "code": "reportAbstractUsage", + "range": { + "startColumn": 19, + "endColumn": 70, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 19, + "endColumn": 70, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 4, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 4, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 4, + "endColumn": 10, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 19, + "endColumn": 25, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 29, + "endColumn": 35, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 31, + "endColumn": 40, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 35, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 11, + "endColumn": 32, + "lineCount": 1 + } + }, + { + "code": "reportAttributeAccessIssue", + "range": { + "startColumn": 35, + "endColumn": 44, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 11, + "endColumn": 32, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 4, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 4, + "endColumn": 49, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 4, + "endColumn": 10, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 29, + "endColumn": 35, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 43, + "endColumn": 66, + "lineCount": 1 + } + }, + { + "code": "reportArgumentType", + "range": { + "startColumn": 38, + "endColumn": 56, + "lineCount": 1 + } + }, + { + "code": "reportUnknownParameterType", + "range": { + "startColumn": 27, + "endColumn": 72, + "lineCount": 1 + } + }, + { + "code": "reportMissingParameterType", + "range": { + "startColumn": 27, + "endColumn": 72, + "lineCount": 1 + } + }, + { + "code": "reportUnknownVariableType", + "range": { + "startColumn": 4, + "endColumn": 18, + "lineCount": 1 + } + }, + { + "code": "reportCallIssue", + "range": { + "startColumn": 26, + "endColumn": 55, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 19, + "endColumn": 33, + "lineCount": 1 + } + }, + { + "code": "reportUnknownArgumentType", + "range": { + "startColumn": 15, + "endColumn": 29, + "lineCount": 1 + } + } + ] + } +} \ No newline at end of file diff --git a/doc/source/_ext/autodocclass.py b/doc/source/_ext/autodocclass.py index 190970e2..9cd5ecb1 100644 --- a/doc/source/_ext/autodocclass.py +++ b/doc/source/_ext/autodocclass.py @@ -1,5 +1,5 @@ from enum import IntEnum -from typing import Any, Optional +from typing import Any from docutils.statemachine import StringList from sphinx.application import Sphinx @@ -28,7 +28,7 @@ def add_directive_header(self, sig: str) -> None: super().add_directive_header(sig) self.add_line(" ", self.get_sourcename()) - def add_content(self, more_content: Optional[StringList]) -> None: + def add_content(self, more_content: StringList | None) -> None: super().add_content(more_content) source_name = self.get_sourcename() diff --git a/examples/00-post_processing/post_processing_context_manager.py b/examples/00-post_processing/post_processing_context_manager.py index 214bd74e..60a2a731 100644 --- a/examples/00-post_processing/post_processing_context_manager.py +++ b/examples/00-post_processing/post_processing_context_manager.py @@ -128,17 +128,17 @@ graphics_window = GraphicsWindow() surf_xy_plane = PlaneSurface.create_from_point_and_normal( - point=[0.0, 0.0, -0.0441921], normal=[0.0, 0.0, 1.0] + point=(0.0, 0.0, -0.0441921), normal=(0.0, 0.0, 1.0) ) graphics_window.add_graphics(surf_xy_plane, position=(0, 0)) surf_yz_plane = PlaneSurface.create_from_point_and_normal( - point=[-0.174628, 0.0, 0.0], normal=[1.0, 0.0, 0.0] + point=(-0.174628, 0.0, 0.0), normal=(1.0, 0.0, 0.0) ) graphics_window.add_graphics(surf_yz_plane, position=(0, 1)) surf_zx_plane = PlaneSurface.create_from_point_and_normal( - point=[0.0, -0.0627297, 0.0], normal=[0.0, 1.0, 0.0] + point=(0.0, -0.0627297, 0.0), normal=(0.0, 1.0, 0.0) ) graphics_window.add_graphics(surf_zx_plane, position=(0, 2)) diff --git a/pyproject.toml b/pyproject.toml index d85f649b..ef7b0e52 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,8 +24,8 @@ packages = [ [tool.poetry.dependencies] python = ">=3.10,<3.14" -importlib-metadata = {version = "^4.0", python = "<3.9"} -ansys-fluent-core = "~=0.38.dev0" +ansys-fluent-core = { git = "https://github.com/ansys/pyfluent", branch = "jhilton/typing-improvements" } +ansys-units = "0.10.0" pyvista = ">=0.44.0" matplotlib = ">=3.6.0" pyvistaqt = { version = "~=0.11.1", optional = true } @@ -34,6 +34,7 @@ pyside6 = { version = "~=6.8.1", optional = true } [tool.poetry.extras] interactive = ["pyvistaqt"] single-window = ["pyvistaqt", "pyside6"] +ci_types = ["pyvistaqt", "pyside6", "ipython"] [tool.poetry.urls] "Documentation" = "https://visualization.fluent.docs.pyansys.com/" @@ -77,3 +78,15 @@ skips = [ "B604", "B607", ] + +[tool.basedpyright] +reportAny = false +reportUnknownMemberType = false +reportExplicitAny = false +reportPrivateUsage = false +reportUnusedCallResult = false +reportUnannotatedClassAttribute = false +reportPrivateImportUsage = false +ignore = ["doc"] +reportMissingTypeStubs=false +baselineFile = ".ci/basedpyright.json" diff --git a/src/ansys/fluent/interface/post_objects/check_in_notebook.py b/src/ansys/fluent/interface/post_objects/check_in_notebook.py index 549caf95..0d76d143 100644 --- a/src/ansys/fluent/interface/post_objects/check_in_notebook.py +++ b/src/ansys/fluent/interface/post_objects/check_in_notebook.py @@ -21,21 +21,25 @@ # SOFTWARE. """Provides a module to check if the library is being used in a Jupyter environment.""" + import warnings from ansys.fluent.core import PyFluentDeprecationWarning -def in_jupyter(): +def in_jupyter() -> bool: """Checks if the library is being used in a Jupyter environment.""" try: from IPython import get_ipython - return "IPKernelApp" in get_ipython().config + return ( + "IPKernelApp" + in get_ipython().config # pyright: ignore[reportOptionalMemberAccess] + ) except (ImportError, AttributeError): return False -def in_notebook(): +def in_notebook() -> bool: warnings.warn("Please use 'in_jupyter' instead.", PyFluentDeprecationWarning) return in_jupyter() diff --git a/src/ansys/fluent/interface/post_objects/meta.py b/src/ansys/fluent/interface/post_objects/meta.py index ed7b735e..f8e17157 100644 --- a/src/ansys/fluent/interface/post_objects/meta.py +++ b/src/ansys/fluent/interface/post_objects/meta.py @@ -22,21 +22,61 @@ """Metaclasses used in various explicit classes in PyFluent.""" -from abc import ABCMeta -from collections.abc import MutableMapping +from abc import ABC, abstractmethod +from collections.abc import Callable, Iterator, MutableMapping, Sequence import inspect -from typing import List - -from ansys.fluent.core.exceptions import DisallowedValuesError, InvalidArgument +from typing import ( + TYPE_CHECKING, + Any, + Concatenate, + Generic, + Never, + Protocol, + Self, + Unpack, + cast, + overload, + override, +) + +from ansys.fluent.core.exceptions import DisallowedValuesError +from ansys.fluent.core.session_solver import Solver +from typing_extensions import ( + NotRequired, + ParamSpec, + TypedDict, + TypeVar, + get_args, + get_original_bases, +) + +if TYPE_CHECKING: + from ansys.fluent.core.services.field_data import LiveFieldData + from ansys.fluent.core.streaming_services.monitor_streaming import MonitorsManager + + from ansys.fluent.interface.post_objects.post_helper import PostAPIHelper + from ansys.fluent.interface.post_objects.post_object_definitions import ( + BasePostObjectDefn, + Defns, + ) + from ansys.fluent.interface.post_objects.post_objects_container import Container # pylint: disable=unused-private-member # pylint: disable=bad-mcs-classmethod-argument +_SelfT = TypeVar("_SelfT", covariant=True) +_T_co = TypeVar("_T_co", covariant=True) + + +class HasAttributes(Protocol): + # attributes: NotRequired[set[str]] # technically this but this is just object + attributes: set[str] + -class Attribute: +class Attribute(Generic[_SelfT, _T_co]): """Attributes.""" - VALID_NAMES = [ + VALID_NAMES = ( "range", "allowed_values", "display_name_allowed_values", @@ -59,40 +99,64 @@ class Attribute: "widget", "dir_info", "extensions", - ] + ) - def __init__(self, function): + def __init__(self, function: Callable[[_SelfT], _T_co], /): self.function = function + self.__doc__: str | None = getattr(function, "__doc__", None) + self.name: str - def __set_name__(self, obj, name): + def __set_name__(self, owner: HasAttributes, name: str): if name not in self.VALID_NAMES: raise DisallowedValuesError("attribute", name, self.VALID_NAMES) self.name = name - if not hasattr(obj, "attributes"): - obj.attributes = set() - obj.attributes.add(name) - - def __set__(self, obj, value): + if not hasattr(owner, "attributes"): + owner.attributes = set[str]() + assert isinstance(owner.attributes, set) + owner.attributes.add(name) + + def __set__( + self, + instance: _SelfT, # pyright: ignore[reportGeneralTypeIssues] + value: _T_co, # pyright: ignore[reportGeneralTypeIssues] + ) -> Never: raise AttributeError("Attributes are read only.") - def __get__(self, obj, objtype=None): - return self.function(obj) + @overload + def __get__(self, instance: None, _) -> Self: ... + + @overload + def __get__( + self, + instance: _SelfT, # pyright: ignore[reportGeneralTypeIssues] + _, + ) -> _T_co: ... + + def __get__(self, instance: _SelfT | None, _) -> _T_co | Self: + if instance is None: + return self + return self.function(instance) -class Command: +P = ParamSpec("P") + + +class Command(Generic[_SelfT, P]): """Executes command.""" - def __init__(self, method): + def __init__(self, method: Callable[Concatenate[_SelfT, P], None]): self.arguments_attrs = {} + self.owner: type + cmd_args = inspect.signature(method).parameters for arg_name in cmd_args: if arg_name != "self": self.arguments_attrs[arg_name] = {} - def _init(_self, obj): + def _init(_self: _SelfT, obj): _self.obj = obj - def _execute(_self, *args, **kwargs): + def _execute(_self: _SelfT, *args: Any, **kwargs: Any): for arg, attr_data in self.arguments_attrs.items(): arg_value = None if arg in kwargs: @@ -137,591 +201,460 @@ def _execute(_self, *args, **kwargs): { "__init__": _init, "__call__": _execute, - "argument_attribute": lambda _self, argument_name, attr_name: self.arguments_attrs[ # noqa: E501 - argument_name - ][ - attr_name - ]( - _self.obj + "argument_attribute": ( + lambda _self, argument_name, attr_name: self.arguments_attrs[ + argument_name + ][attr_name](_self.obj) ), "arguments": lambda _self: list(self.arguments_attrs.keys()), }, ) - def __set_name__(self, obj, name): - self.obj = obj - if not hasattr(obj, "commands"): - obj.commands = {} - obj.commands[name] = {} + def __set_name__(self, owner: type, name: str) -> None: + self.owner = owner + if not hasattr(owner, "commands"): + owner.commands = {} + owner.commands[name] = {} - def __get__(self, obj, obj_type=None): - if hasattr(self, "command"): - return self.command - else: - return self.command_cls(obj) + def __get__(self, instance: _SelfT, _): # pyright: ignore[reportGeneralTypeIssues] + return self.command_cls(instance) -def CommandArgs(command_object, argument_name): - """Command arguments.""" +TT = TypeVar("TT", bound=type) +T = TypeVar("T") +T2 = TypeVar("T2") - def wrapper(attribute): - if argument_name in command_object.arguments_attrs: - command_object.arguments_attrs[argument_name].update( - {attribute.__name__: attribute} - ) - else: - raise InvalidArgument(f"{argument_name} not a valid argument.") - return attribute - - return wrapper - - -class PyLocalBaseMeta(type): - """Local base metaclass.""" - - @classmethod - def __create_get_ancestors_by_type(cls): - def wrapper(self, obj_type, obj=None): - obj = self if obj is None else obj - parent = None - if getattr(obj, "_parent", None): - if isinstance(obj._parent, obj_type): - return obj._parent - parent = self.get_ancestors_by_type(obj_type, obj._parent) - return parent - - return wrapper - - @classmethod - def __create_get_ancestors_by_name(cls): - def wrapper(self, obj_type, obj=None): - obj = self if obj is None else obj - parent = None - if getattr(obj, "_parent", None): - if obj._parent.__class__.__name__ == obj_type: - return obj._parent - if getattr(obj._parent, "PLURAL", None) == obj_type: - return obj._parent._parent - parent = self.get_ancestors_by_name(obj_type, obj._parent) - return parent - - return wrapper - - @classmethod - def __create_get_root(cls): - def wrapper(self, obj=None): - obj = self if obj is None else obj - parent = obj - if getattr(obj, "_parent", None): - parent = self.get_root(obj._parent) - return parent - - return wrapper - - @classmethod - def __create_get_session(cls): - def wrapper(self, obj=None): - root = self.get_root(obj) - return root.session - - return wrapper - - @classmethod - def __create_get_session_handle(cls): - def wrapper(self, obj=None): - root = self.get_root(obj) - return getattr(root, "session_handle", None) - - return wrapper - - @classmethod - def __create_get_path(cls): - def wrapper(self): - if getattr(self, "_parent", None): - return self._parent.get_path() + "/" + self._name - return self._name - - return wrapper - - def __new__(cls, name, bases, attrs): - attrs["get_ancestors_by_type"] = cls.__create_get_ancestors_by_type() - attrs["get_ancestors_by_name"] = cls.__create_get_ancestors_by_name() - attrs["get_root"] = cls.__create_get_root() - attrs["get_session"] = cls.__create_get_session() - attrs["get_session_handle"] = cls.__create_get_session_handle() - if "get_path" not in attrs: - attrs["get_path"] = cls.__create_get_path() - attrs["root"] = property(lambda self: self.get_root()) - attrs["path"] = property(lambda self: self.get_path()) - attrs["session"] = property(lambda self: self.get_session()) - attrs["field_data"] = property(lambda self: self.get_session().field_data) - attrs["monitors"] = property(lambda self: self.get_session().monitors) - attrs["session_handle"] = property(lambda self: self.get_session_handle()) - return super(PyLocalBaseMeta, cls).__new__(cls, name, bases, attrs) - - -class PyLocalPropertyMeta(PyLocalBaseMeta): - """Metaclass for local property classes.""" - - @classmethod - def __create_init(cls): - def wrapper(self, parent, api_helper, name=""): - """Create the initialization method for 'PyLocalPropertyMeta'.""" - self._name = name - self._api_helper = api_helper(self) - self._parent = parent - self._on_change_cbs = [] - annotations = self.__class__.__dict__.get("__annotations__") - if isinstance(getattr(self.__class__, "value", None), property): - value_annotation = annotations.get("_value") - else: - value_annotation = annotations.get("value") - self.type = value_annotation - reset_on_change = ( - hasattr(self, "_reset_on_change") - and getattr(self, "_reset_on_change")() - ) +AccessorT = TypeVar("AccessorT", bound="BasePostObjectDefn") + +ParentT = TypeVar("ParentT") - on_change = getattr(self, "on_change", None) - if on_change is not None: - self._register_on_change_cb(on_change) - if reset_on_change: - for obj in reset_on_change: - def reset(): - setattr(self, "_value", None) - for on_change_cb in self._on_change_cbs: - on_change_cb() +class PyLocalBase(Generic[ParentT]): + """Local base.""" + + def __init__(self, parent: ParentT, name: str = ""): + self._parent = parent + self._name = name - obj._register_on_change_cb(reset) + def get_ancestors_by_type( + self, instance: type[AccessorT], owner: "PyLocalBase[Any] | None" = None + ) -> AccessorT: + owner = self if owner is None else owner + parent = None + if hasattr(owner, "_parent"): + if isinstance(owner._parent, instance): + return owner._parent + parent = self.get_ancestors_by_type(instance, owner._parent) + assert parent is not None + return parent - return wrapper + def get_root(self, instance=None) -> "Container": + instance = self if instance is None else instance + parent = instance + if hasattr(instance, "_parent"): + parent = self.get_root(instance._parent) + return parent - @classmethod - def __create_get_state(cls, show_attributes=False): - def wrapper(self): - rv = self.value + def get_session(self, instance) -> Solver: + root = self.get_root(instance) + return root.session - if hasattr(self, "allowed_values"): - allowed_values = self.allowed_values - if len(allowed_values) > 0 and ( - rv is None - or (not isinstance(rv, list) and rv not in allowed_values) - ): - self.set_state(allowed_values[0]) - rv = self.value + def get_path(self) -> str: + if hasattr(self, "_parent"): + return self._parent.get_path() + "/" + self._name + return self._name + @property + def root(self) -> "Container": + """Top-most parent object.""" + return self.get_root(self) + + @property + def path(self) -> str: + """Path to the current object.""" + return self.get_path() + + @property + def session(self) -> "Solver": + """Session associated with the current object.""" + return self.get_session(self) + + @property + def field_data(self) -> "LiveFieldData": + """Field data associated with the current object.""" + return self.session.fields.field_data + + @property + def monitors(self) -> "MonitorsManager": + """Monitors associated with the current object.""" + return self.session.monitors + + +ParentT = TypeVar("ParentT") + + +class PyLocalProperty(PyLocalBase[ParentT], Generic[ParentT, T]): + """Local property classes.""" + + value: T # pyright: ignore[reportUninitializedInstanceVariable] + + def __init__( + self, parent: ParentT, api_helper: "type[PostAPIHelper]", name: str = "" + ): + super().__init__(parent, name) + self._api_helper = api_helper(self) + self._on_change_cbs = [] + self.type: type[T] = get_args(get_original_bases(self.__class__)[1])[ + 1 + ] # T for the class + reset_on_change = ( + hasattr(self, "_reset_on_change") and getattr(self, "_reset_on_change")() + ) + + try: + on_change = self.on_change + except AttributeError: + pass + else: + self._register_on_change_cb(on_change) + if reset_on_change: + for obj in reset_on_change: + + def reset() -> None: + setattr(self, "_value", None) + for on_change_cb in self._on_change_cbs: + on_change_cb() + + obj._register_on_change_cb(reset) + + def __call__(self) -> T: + rv = self.value + + try: + allowed_values = self.allowed_values + except AttributeError: return rv + else: + if len(allowed_values) > 0 and ( + rv is None or (not isinstance(rv, list) and rv not in allowed_values) + ): + self.set_state(allowed_values[0]) + rv = self.value + + return rv + + if TYPE_CHECKING: + + def __set__(self, instance: object, value: T) -> None: ... + + def set_state(self, value: T): + self.value = value + for on_change_cb in self._on_change_cbs: + on_change_cb() + + def _register_on_change_cb(self, on_change_cb: Callable[[], None]): + self._on_change_cbs.append(on_change_cb) + + @Attribute + @overload + def allowed_values(self: "PyLocalProperty[Any, Sequence[T2]]") -> Sequence[T2]: ... + @Attribute + @overload + def allowed_values(self: "PyLocalProperty[Any, T2]") -> Sequence[T2]: ... + @Attribute + def allowed_values(self) -> Sequence[object]: + """Get allowed values.""" + raise NotImplementedError("allowed_values not implemented.") + + +# class PyReferenceObject: +# """Local object classes.""" + +# def __init__(self, parent, path, location, session_id, name: str = ""): +# self._parent = parent +# self.type = "object" +# self.parent = parent +# self._path = path +# self.location = location +# self.session_id = session_id + +# def update(clss): +# for name, cls in inspect.getmembers(clss, predicate=inspect.isclass): +# if issubclass(cls, (PyLocalProperty, PyLocalObject)): +# setattr( +# self, +# name, +# cls(self, lambda arg: None, name), +# ) +# if issubclass(cls, PyLocalNamedObject): +# setattr( +# self, +# cls.PLURAL, +# PyLocalContainer(self, cls, lambda arg: None, cls.PLURAL), +# ) +# for base_class in clss.__bases__: +# update(base_class) + +# update(self.__class__) + +# def get_path(self): +# return self._path + +# def reset(self, path: str, location: str, session_id: str) -> None: +# self._path = path +# self.location = location +# self.session_id = session_id +# if hasattr(self, "_object"): +# delattr(self, "_object") + + +class PyLocalObject(PyLocalBase[ParentT]): + """Local object classes.""" + + def __init__( + self, parent: ParentT, api_helper: "type[PostAPIHelper]", name: str = "" + ): + """Create the initialization method for 'PyLocalObjectMeta'.""" + super().__init__(parent, name) + self._api_helper = api_helper(self) + self._command_names = [] + self.type = "object" - return wrapper - - @classmethod - def __create_set_state(cls): - def wrapper(self, value): - self.value = value - for on_change_cb in self._on_change_cbs: - on_change_cb() - - return wrapper - - @classmethod - def __create_register_on_change(cls): - def wrapper(self, on_change_cb): - self._on_change_cbs.append(on_change_cb) - - return wrapper - - def __new__(cls, name, bases, attrs): - attrs["__init__"] = cls.__create_init() - attrs["__call__"] = cls.__create_get_state() - attrs["_register_on_change_cb"] = cls.__create_register_on_change() - attrs["set_state"] = cls.__create_set_state() - return super(PyLocalPropertyMeta, cls).__new__(cls, name, bases, attrs) - - -class PyReferenceObjectMeta(PyLocalBaseMeta): - """Metaclass for local object classes.""" - - @classmethod - def __create_init(cls): - def wrapper(self, parent, path, location, session_id, name=""): - """Create the initialization method for 'PyReferenceObjectMeta'.""" - self._parent = parent - self.type = "object" - self.parent = parent - self._path = path - self.location = location - self.session_id = session_id - - def update(clss): - for name, cls in clss.__dict__.items(): - if cls.__class__.__name__ in ( - "PyLocalPropertyMeta", - "PyLocalObjectMeta", - ): - setattr( - self, - name, - cls(self, lambda arg: None, name), - ) - if ( - cls.__class__.__name__ == "PyLocalNamedObjectMeta" - or cls.__class__.__name__ == "PyLocalNamedObjectMetaAbstract" - ): - setattr( - self, - cls.PLURAL, - PyLocalContainer(self, cls, lambda arg: None, cls.PLURAL), - ) - for base_class in clss.__bases__: - update(base_class) - - update(self.__class__) - - return wrapper - - @classmethod - def __create_get_path(cls): - def wrapper(self): - return self._path - - return wrapper - - @classmethod - def __create_reset(cls): - def wrapper(self, path, location, session_id): - self._path = path - self.location = location - self.session_id = session_id - if hasattr(self, "_object"): - delattr(self, "_object") - - return wrapper - - @classmethod - def __create_getattr(cls): - def wrapper(self, item): - if item == "_object": - top_most_parent = self.get_root(self) - - if self.session_id is None: - self.session_id = top_most_parent.session.id - property_editor_data = top_most_parent.accessor( - "AnsysUser", self.session_id - ) - ( - obj, - cmd_data, - ) = property_editor_data.get_object_and_command_data_from_properties_info( # noqa: E501 - {"path": self.path, "properties": {}, "type": self.location} + update(self.__class__) + + def _add_classes_to_instance( + self, clss: type[PyLocalBase[object]], api_helper: "type[PostAPIHelper]" + ) -> None: + for name, cls in inspect.getmembers(clss, predicate=inspect.isclass): + if issubclass(cls, PyLocalCommand): + self._command_names.append(name) + + if issubclass(cls, (PyLocalProperty, PyLocalObject, PyLocalCommand)): + setattr( + self, + name, + cls(self, api_helper, name), ) - if obj is not None: - self._object = obj - return obj - if item == "ref": - return self._object._object - - return wrapper - - def __new__(cls, name, bases, attrs): - attrs["__init__"] = attrs.get("__init__", cls.__create_init()) - attrs["__getattr__"] = attrs.get("__getattr__", cls.__create_getattr()) - attrs["reset"] = cls.__create_reset() - attrs["get_path"] = cls.__create_get_path() - return super(PyReferenceObjectMeta, cls).__new__(cls, name, bases, attrs) - - -class PyLocalObjectMeta(PyLocalBaseMeta): - """Metaclass for local object classes.""" - - @classmethod - def __create_init(cls): - def wrapper(self, parent, api_helper, name=""): - """Create the initialization method for 'PyLocalObjectMeta'.""" - self._parent = parent - self._name = name - self._api_helper = api_helper(self) - self._command_names = [] - self.type = "object" - - def update(clss): - for name, cls in clss.__dict__.items(): - if cls.__class__.__name__ in ("PyLocalCommandMeta"): - self._command_names.append(name) - - if cls.__class__.__name__ in ( - "PyLocalPropertyMeta", - "PyLocalObjectMeta", - "PyLocalCommandMeta", - ): - setattr( - self, - name, - cls(self, api_helper, name), - ) - if ( - cls.__class__.__name__ == "PyLocalNamedObjectMeta" - or cls.__class__.__name__ == "PyLocalNamedObjectMetaAbstract" - ): - setattr( - self, - cls.PLURAL, - PyLocalContainer(self, cls, api_helper, cls.PLURAL), - ) - if cls.__class__.__name__ == "PyReferenceObjectMeta": - setattr( - self, - name, - cls(self, cls.PATH, cls.LOCATION, cls.SESSION, name), - ) - for base_class in clss.__bases__: - update(base_class) - - update(self.__class__) - - return wrapper - - @classmethod - def __create_getattribute(cls): - def wrapper(self, name): - obj = object.__getattribute__(self, name) - return obj - - return wrapper - - @classmethod - def __create_updateitem(cls): - def wrapper(self, value): - properties = value - sort_by = None - if hasattr(self, "sort_by"): - sort_by = self.sort_by - elif hasattr(self, "include"): - sort_by = self.include - if sort_by: - sorted_properties = { - prop: properties[prop] for prop in sort_by if prop in properties - } - sorted_properties.update( - {k: v for k, v in properties.items() if k not in sort_by} + if issubclass(cls, PyLocalNamedObject): + setattr( + self, + cls.PLURAL, + PyLocalContainer(self, cls, api_helper, cls.PLURAL), ) - properties.clear() - properties.update(sorted_properties) - for name, val in properties.items(): - obj = getattr(self, name) - if obj.__class__.__class__.__name__ == "PyLocalPropertyMeta": - obj.set_state(val) - else: - if obj.__class__.__class__.__name__ == "PyReferenceObjectMeta": - obj = obj.ref - obj.update(val) - - wrapper.__doc__ = "Update object." - return wrapper - - @classmethod - def __create_get_state(cls): - def wrapper(self, show_attributes=False): - state = {} - - if not getattr(self, "is_active", True): - return - - def update_state(clss): - for name, cls in clss.__dict__.items(): - o = getattr(self, name) - if o is None or name.startswith("_") or name.startswith("__"): - continue - - if cls.__class__.__name__ == "PyReferenceObjectMeta": - if o.LOCATION == "local": - o = o.ref - else: - continue - elif cls.__class__.__name__ == "PyLocalCommandMeta": - args = {} - for arg in o._args: - args[arg] = getattr(o, arg)() - state[name] = args - if ( - cls.__class__.__name__ == "PyLocalObjectMeta" - or cls.__class__.__name__ == "PyReferenceObjectMeta" - ): - if getattr(o, "is_active", True): - state[name] = o(show_attributes) - elif ( - cls.__class__.__name__ == "PyLocalNamedObjectMeta" - or cls.__class__.__name__ == "PyLocalNamedObjectMetaAbstract" - ): - container = getattr(self, cls.PLURAL) - if getattr(container, "is_active", True): - state[cls.PLURAL] = {} - for child_name in container: - o = container[child_name] - if getattr(o, "is_active", True): - state[cls.PLURAL][child_name] = o() - - elif cls.__class__.__name__ == "PyLocalPropertyMeta": - if getattr(o, "is_active", True): - state[name] = o() - attrs = show_attributes and getattr(o, "attributes", None) - if attrs: - for attr in attrs: - state[name + "." + attr] = getattr(o, attr) - - for base_class in clss.__bases__: - update_state(base_class) - - update_state(self.__class__) - return state - - return wrapper - - @classmethod - def __create_setattr(cls): - def wrapper(self, name, value): - attr = getattr(self, name, None) - if attr and attr.__class__.__class__.__name__ == "PyLocalPropertyMeta": - attr.set_state(value) + # if issubclass(cls, PyReferenceObject): + # setattr( + # self, + # name, + # cls(self, cls.PATH, cls.LOCATION, cls.SESSION, name), + # ) + for base_class in clss.__bases__: + update(base_class) + + def update(self, value: dict[str, Any]): + """Update object.""" + properties = value + sort_by = None + if hasattr(self, "sort_by"): + sort_by = self.sort_by + elif hasattr(self, "include"): + sort_by = self.include + if sort_by: + sorted_properties = { + prop: properties[prop] for prop in sort_by if prop in properties + } + sorted_properties.update( + {k: v for k, v in properties.items() if k not in sort_by} + ) + properties.clear() + properties.update(sorted_properties) + for name, val in properties.items(): + obj = getattr(self, name) + if isinstance(obj, PyLocalProperty): + obj.set_state(val) else: - object.__setattr__(self, name, value) + # if isinstance(obj, PyReferenceObject): + # obj = obj.ref + obj.update(val) + + def get_state(self, show_attributes: bool = False) -> dict[str, Any] | None: + state: dict[str, Any] = {} + + if not getattr(self, "is_active", True): + return + + def update_state(clss): + for name, cls in inspect.getmembers(clss, predicate=inspect.isclass): + o = getattr(self, name) + if o is None or name.startswith("_") or name.startswith("__"): + continue + + # if issubclass(cls, PyReferenceObject): + # if o.LOCATION == "local": + # o = o.ref + # else: + # continue + if issubclass(cls, PyLocalCommand): + args = {} + for arg in o._args: + args[arg] = getattr(o, arg)() + state[name] = args + if issubclass(cls, PyLocalObject): + if getattr(o, "is_active", True): + state[name] = o(show_attributes) + elif issubclass(cls, PyLocalNamedObject): + container = getattr(self, cls.PLURAL) + if getattr(container, "is_active", True): + state[cls.PLURAL] = {} + for child_name in container: + o = container[child_name] + if getattr(o, "is_active", True): + state[cls.PLURAL][child_name] = o() + + elif issubclass(cls, PyLocalProperty): + if getattr(o, "is_active", True): + state[name] = o() + attrs = show_attributes and getattr(o, "attributes", None) + if attrs: + for attr in attrs: + state[name + "." + attr] = getattr(o, attr) + + for base_class in clss.__bases__: + update_state(base_class) + + update_state(self.__class__) + return state + + __call__ = get_state + + def __setattr__(self, name: str, value: Any): + attr = getattr(self, name, None) + if attr and isinstance(attr, PyLocalProperty): + attr.set_state(value) + else: + object.__setattr__(self, name, value) - return wrapper - def __new__(cls, name, bases, attrs): - attrs["__getattribute__"] = cls.__create_getattribute() - attrs["__init__"] = attrs.get("__init__", cls.__create_init()) - if "__call__" not in attrs: - attrs["__call__"] = cls.__create_get_state() - attrs["__setattr__"] = cls.__create_setattr() - attrs["update"] = cls.__create_updateitem() - return super(PyLocalObjectMeta, cls).__new__(cls, name, bases, attrs) +CallKwargs = TypeVar("CallKwargs", bound=TypedDict) -class PyLocalCommandMeta(PyLocalObjectMeta): +class PyLocalCommand(PyLocalObject[ParentT], Generic[ParentT, CallKwargs], ABC): """Local object metaclass.""" - @classmethod - def __create_init(cls): - def wrapper(self, parent, api_helper, name=""): - """Create the initialization method for 'PyLocalObjectMeta'.""" - self._parent = parent - self._name = name - self._api_helper = api_helper(self) - self.type = "object" - self._args = [] - self._command_names = [] - self._exe_cmd = getattr(self, "_exe_cmd") - - def update(clss): - for name, cls in clss.__dict__.items(): - if cls.__class__.__name__ in ( - "PyLocalCommandArgMeta", - "PyLocalPropertyMeta", - ): - self._args.append(name) - setattr( - self, - name, - cls(self, api_helper, name), - ) - for base_class in clss.__bases__: - update(base_class) - - update(self.__class__) - - return wrapper - - @classmethod - def __execute_command(cls): - def wrapper(self, **kwargs): - for arg_name, arg_value in kwargs.items(): - getattr(self, arg_name).set_state(arg_value) - cmd_args = {} - for arg_name in self._args: - cmd_args[arg_name] = getattr(self, arg_name)() - rv = self._exe_cmd(**cmd_args) - return rv + def __init__( + self, parent: ParentT, api_helper: "type[PostAPIHelper]", name: str = "" + ): + self._parent = parent + self._name = name + self._api_helper = api_helper(self) + self.type = "object" + self._args = [] + self._command_names = [] + + @abstractmethod + def _exe_cmd(self, **kwargs: Unpack[CallKwargs]) -> Any: + """Execute command.""" + raise NotImplementedError("not implemented") + + def _update(self, api_helper: "type[PostAPIHelper]") -> None: + def update(clss) -> None: + for name, cls in inspect.getmembers(clss, predicate=inspect.isclass): + if issubclass(cls, PyLocalProperty): + self._args.append(name) + setattr( + self, + name, + cls(self, api_helper, name), + ) + for base_class in clss.__bases__: + update(base_class) + + def __call__(self, **kwargs: Unpack[CallKwargs]): + for arg_name, arg_value in kwargs.items(): + getattr(self, arg_name).set_state(arg_value) + cmd_args = {} + for arg_name in self._args: + cmd_args[arg_name] = getattr(self, arg_name)() + return self._exe_cmd(**cmd_args) + + +class PyLocalNamedObject(PyLocalObject[ParentT]): + """Base class for local named object classes.""" + + PLURAL: str + + def __init__(self, name: str, parent: ParentT, api_helper: "type[PostAPIHelper]"): + self._name = name + self._api_helper = api_helper(self) + self._parent = parent + self._command_names = [] + self.type = "object" + + def update(clss): + for name, cls in inspect.getmembers(clss, predicate=inspect.isclass): + if issubclass(cls, PyLocalCommand): + self._command_names.append(name) + + if issubclass(cls, (PyLocalProperty, PyLocalObject, PyLocalCommand)): + # delete old property if overridden + if getattr(self, name).__name__ == name: + delattr(self, name) + setattr( + self, + name, + cls(self, api_helper, name), + ) + elif issubclass(cls, PyLocalNamedObject): + setattr( + self, + cls.PLURAL, + PyLocalContainer(self, cls, api_helper, cls.PLURAL), + ) + # elif issubclass(cls, PyReferenceObject): + # setattr(self, name, cls(self, cls.PATH, cls.LOCATION, cls.SESSION)) + for base_class in clss.__bases__: + update(base_class) - return wrapper - - def __new__(cls, name, bases, attrs): - attrs["__init__"] = cls.__create_init() - attrs["__call__"] = cls.__execute_command() - return super(PyLocalCommandMeta, cls).__new__(cls, name, bases, attrs) - - -class PyLocalNamedObjectMeta(PyLocalObjectMeta): - """Metaclass for local named object classes.""" - - @classmethod - def __create_init(cls): - def wrapper(self, name, parent, api_helper): - """Create the initialization method for 'PyLocalNamedObjectMeta'.""" - self._name = name - self._api_helper = api_helper(self) - self._parent = parent - self._command_names = [] - self.type = "object" - - def update(clss): - for name, cls in clss.__dict__.items(): - if cls.__class__.__name__ in ("PyLocalCommandMeta"): - self._command_names.append(name) - - if cls.__class__.__name__ in ( - "PyLocalPropertyMeta", - "PyLocalObjectMeta", - "PyLocalCommandMeta", - ): - # delete old property if overridden - if getattr(self, name).__class__.__name__ == name: - delattr(self, name) - setattr( - self, - name, - cls(self, api_helper, name), - ) - elif ( - cls.__class__.__name__ == "PyLocalNamedObjectMeta" - or cls.__class__.__name__ == "PyLocalNamedObjectMetaAbstract" - ): - setattr( - self, - cls.PLURAL, - PyLocalContainer(self, cls, api_helper, cls.PLURAL), - ) - elif cls.__class__.__name__ == "PyReferenceObjectMeta": - setattr( - self, name, cls(self, cls.PATH, cls.LOCATION, cls.SESSION) - ) - for base_class in clss.__bases__: - update(base_class) - - update(self.__class__) - - return wrapper - - def __new__(cls, name, bases, attrs): - attrs["__init__"] = cls.__create_init() - return super(PyLocalNamedObjectMeta, cls).__new__(cls, name, bases, attrs) - - -class PyLocalNamedObjectMetaAbstract(ABCMeta, PyLocalNamedObjectMeta): - """Local named object abstract metaclass.""" - - pass - - -class PyLocalContainer(MutableMapping): + update(self.__class__) + + if TYPE_CHECKING: + + def create(self) -> Self: ... + + +DefnT = TypeVar("DefnT", bound="Defns", default="Defns") + + +def if_type_checking_instantiate( + type: type[T], +) -> ( + T +): # the current behaviour has all of the classes that use this initialised in the XXX class + return cast(T, type) # this is hopefully obviously unsafe + + +class _DeleteKwargs(TypedDict, total=False): + names: list[str] + + +class _CreateKwargs(TypedDict, total=False): + name: str | None + + +class PyLocalContainer(MutableMapping[str, DefnT]): """Local container for named objects.""" - def __init__(self, parent, object_class, api_helper, name=""): + def __init__( + self, + parent: "Container", + object_class: type[PyLocalNamedObject[Any]], + api_helper: "type[PostAPIHelper]", + name: str = "", + ): """Initialize the 'PyLocalContainer' object.""" self._parent = parent self._name = name self.__object_class = object_class - self._local_collection = {} + self._local_collection: dict[str, DefnT] = {} self.__api_helper = api_helper self.type = "named-object" self._command_names = [] @@ -734,7 +667,7 @@ def __init__(self, parent, object_class, api_helper, name=""): PyLocalContainer.exclude = property( lambda self: self.__object_class.EXCLUDE(self) ) - if hasattr(object_class, "INCLUDE"): + if hasattr(object_class, "INCLUDE"): # TODO sort_by? PyLocalContainer.include = property( lambda self: self.__object_class.INCLUDE(self) ) @@ -755,128 +688,128 @@ def __init__(self, parent, object_class, api_helper, name=""): lambda self: self.__object_class.IS_ACTIVE(self) ) - for name, cls in self.__class__.__dict__.items(): - if cls.__class__.__name__ in ("PyLocalCommandMeta"): + for name, cls in inspect.getmembers(self.__class__, predicate=inspect.isclass): + if issubclass(cls, PyLocalCommand): self._command_names.append(name) - - if cls.__class__.__name__ in ("PyLocalCommandMeta"): setattr( self, name, cls(self, api_helper, name), ) - def update(self, value): - """Updates this object with the provided dictionary.""" - for name, val in value.items(): - o = self[name] - o.update(val) - - def get_root(self, obj=None): + def get_root(self, obj: "PyLocalContainer | None" = None) -> "Container": """Returns the top-most parent object.""" obj = self if obj is None else obj parent = obj if getattr(obj, "_parent", None): parent = self.get_root(obj._parent) - return parent - def get_session(self, obj=None): + return cast("Container", parent) + + def get_session(self, obj: "PyLocalContainer | None" = None) -> "Solver": """Returns the session object.""" root = self.get_root(obj) return root.session - def get_path(self): + def get_path(self) -> str: """Path to the current object.""" if getattr(self, "_parent", None): return self._parent.get_path() + "/" + self._name return self._name @property - def path(self): + def path(self) -> str: """Path to the current object.""" return self.get_path() @property - def session(self): + def session(self) -> "Solver": """Returns the session object.""" return self.get_session() - def get_session_handle(self, obj=None): - """Returns the session-handle object.""" - root = self.get_root(obj) - return getattr(root, "session_handle", None) - - @property - def session_handle(self): - """Returns the session-handle object.""" - return self.get_session_handle() - - def __iter__(self): + @override + def __iter__(self) -> Iterator[str]: return iter(self._local_collection) - def __len__(self): + @override + def __len__(self) -> int: return len(self._local_collection) - def __getitem__(self, name): + @override + def __getitem__(self, name: str) -> DefnT: o = self._local_collection.get(name, None) if not o: o = self._local_collection[name] = self.__object_class( name, self, self.__api_helper ) - on_create = getattr(self._PyLocalContainer__object_class, "on_create", None) + on_create = getattr(self.__object_class, "on_create", None) if on_create: on_create(self, name) return o - def __setitem__(self, name, value): + @override + def __setitem__(self, name: str, value: DefnT) -> None: o = self[name] o.update(value) - def __delitem__(self, name): + @override + def __delitem__(self, name: str) -> None: del self._local_collection[name] - on_delete = getattr(self._PyLocalContainer__object_class, "on_delete", None) + on_delete = getattr(self.__object_class, "on_delete", None) if on_delete: on_delete(self, name) - def _get_unique_chid_name(self): + def _get_unique_child_name(self) -> str: children = list(self) index = 0 while True: - unique_name = ( - f"{self._PyLocalContainer__object_class.__name__.lower()}-{index}" - ) + unique_name = f"{self.__object_class.__name__.lower()}-{index}" if unique_name not in children: break index += 1 return unique_name - class Delete(metaclass=PyLocalCommandMeta): + if TYPE_CHECKING: + + def create( + self, + ): ... + + class Delete(PyLocalCommand["PyLocalContainer", _DeleteKwargs]): """Local delete command.""" - def _exe_cmd(self, names): + @override + def _exe_cmd(self, names: list[str]) -> None: for item in names: self._parent.__delitem__(item) - class names(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class names(PyLocalProperty["Delete", list[str]]): """Local names property.""" - value: List[str] = [] + value = [] @Attribute def allowed_values(self): """Get allowed values.""" return list(self._parent._parent) - class Create(metaclass=PyLocalCommandMeta): + class Create(PyLocalCommand["PyLocalContainer", _CreateKwargs]): """Local create command.""" - def _exe_cmd(self, name=None): + @override + def _exe_cmd(self, name: str | None = None): if name is None: - name = self._parent._get_unique_chid_name() - new_object = self._parent.__getitem__(name) + name = self._parent._get_unique_child_name() + new_object = self._parent[name] return new_object._name - class name(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class name(PyLocalProperty["Create", str | None]): """Local name property.""" - value: str = None + value = None + + # added by __init__ + delete: Delete + create: Create diff --git a/src/ansys/fluent/interface/post_objects/post_helper.py b/src/ansys/fluent/interface/post_objects/post_helper.py index 1d00ddad..45fdebb4 100644 --- a/src/ansys/fluent/interface/post_objects/post_helper.py +++ b/src/ansys/fluent/interface/post_objects/post_helper.py @@ -23,10 +23,16 @@ """Provides a module for post objects.""" import re +from typing import TYPE_CHECKING, cast +from ansys.fluent.core.services import LiveFieldData from ansys.fluent.core.solver.flunits import get_si_unit_for_fluent_quantity from ansys.fluent.core.utils.fluent_version import FluentVersion +if TYPE_CHECKING: + from ansys.fluent.interface.post_objects.meta import PyLocalBase + from ansys.fluent.visualization import Surface + class IncompleteISOSurfaceDefinition(RuntimeError): """Raised when iso-surface definition is incomplete.""" @@ -50,25 +56,25 @@ class PostAPIHelper: class _SurfaceAPI: """Class providing APIs for surface operations.""" - def __init__(self, obj): + def __init__(self, obj: "Surface"): self.obj = obj self._surface_name_on_server = self.surface_name_on_server(obj._name) @staticmethod - def surface_name_on_server(local_surface_name): + def surface_name_on_server(local_surface_name: str) -> str: """Return the surface name on server.""" return local_surface_name.lower() def _get_api_handle(self): return self.obj.get_root().session.results.surfaces - def _delete_if_exists_on_server(self): + def _delete_if_exists_on_server(self) -> None: field_data = self.obj._api_helper.field_data() surfaces_list = list(field_data.surfaces()) if self._surface_name_on_server in surfaces_list: self.delete_surface_on_server() - def create_surface_on_server(self): + def create_surface_on_server(self) -> None: """Create the surface on server. Raises @@ -135,7 +141,7 @@ def create_surface_on_server(self): if self._surface_name_on_server not in surfaces_list: raise SurfaceCreationError() - def delete_surface_on_server(self): + def delete_surface_on_server(self) -> None: """Deletes the surface on server.""" if self.obj.definition.type() == "iso-surface": iso_surface = self._get_api_handle().iso_surface @@ -148,14 +154,16 @@ def delete_surface_on_server(self): if name in plane_surface(): del plane_surface[name] - def __init__(self, obj): + def __init__(self, obj: "PyLocalBase"): """__init__ method of PostAPIHelper class.""" self.obj = obj - self.field_data = lambda: obj.get_root().session.fields.field_data - if obj.__class__.__name__ == "Surface": + self.field_data = lambda: cast( + "LiveFieldData", obj.get_root().session.fields.field_data + ) + if isinstance(obj, Surface): self.surface_api = PostAPIHelper._SurfaceAPI(obj) - def remote_surface_name(self, local_surface_name): + def remote_surface_name(self, local_surface_name: str) -> str: """Return the surface name.""" local_surfaces_provider = self.obj.get_root()._local_surfaces_provider() @@ -165,7 +173,7 @@ def remote_surface_name(self, local_surface_name): else: return local_surface_name - def get_field_unit(self, field): + def get_field_unit(self, field: str) -> str | None: """Return the unit of the field.""" session = self.obj.get_root().session if FluentVersion(session.scheme.version) < FluentVersion.v252: @@ -178,11 +186,11 @@ def get_field_unit(self, field): fields_info = self.field_data().scalar_fields() return get_si_unit_for_fluent_quantity(fields_info[field]["quantity_name"]) - def _field_unit_quantity(self, field): + def _field_unit_quantity(self, field: str) -> str: scheme_eval_str = f"(cdr (assq 'units (%fill-render-info '{field})))" return self._scheme_str_to_py_list(scheme_eval_str)[0] - def _scheme_str_to_py_list(self, scheme_eval_str): + def _scheme_str_to_py_list(self, scheme_eval_str: str) -> list[str]: session = self.obj.get_root().session if hasattr(session, "scheme_eval"): str_val = session.scheme.string_eval(scheme_eval_str) diff --git a/src/ansys/fluent/interface/post_objects/post_object_definitions.py b/src/ansys/fluent/interface/post_objects/post_object_definitions.py index 29819335..0960d254 100644 --- a/src/ansys/fluent/interface/post_objects/post_object_definitions.py +++ b/src/ansys/fluent/interface/post_objects/post_object_definitions.py @@ -22,24 +22,45 @@ """Module providing visualization objects definition.""" +import abc from abc import abstractmethod +from collections.abc import Callable, Sequence import logging -from typing import List, NamedTuple +from typing import ( + TYPE_CHECKING, + Literal, + Protocol, + TypeAlias, + cast, + final, + override, +) from ansys.fluent.interface.post_objects.meta import ( Attribute, - PyLocalNamedObjectMetaAbstract, - PyLocalObjectMeta, - PyLocalPropertyMeta, + Command, + PyLocalNamedObject, + PyLocalObject, + PyLocalProperty, + if_type_checking_instantiate, ) +if TYPE_CHECKING: + from ansys.fluent.interface.post_objects.post_objects_container import Container + logger = logging.getLogger("pyfluent.post_objects") -class BasePostObjectDefn: +class BasePostObjectDefn(Protocol, metaclass=abc.ABCMeta): """Base class for visualization objects.""" - def _pre_display(self): + @abc.abstractmethod + def get_root(self, instance: object = None) -> "Container": + raise NotImplementedError + + surfaces: Callable[[], Sequence[str]] + + def _pre_display(self) -> None: local_surfaces_provider = self.get_root()._local_surfaces_provider() for surf_name in self.surfaces(): if surf_name in list(local_surfaces_provider): @@ -47,7 +68,7 @@ def _pre_display(self): surf_api = surf_obj._api_helper.surface_api surf_api.create_surface_on_server() - def _post_display(self): + def _post_display(self) -> None: local_surfaces_provider = self.get_root()._local_surfaces_provider() for surf_name in self.surfaces(): if surf_name in list(local_surfaces_provider): @@ -56,11 +77,12 @@ def _post_display(self): surf_api.delete_surface_on_server() -class GraphicsDefn(BasePostObjectDefn, metaclass=PyLocalNamedObjectMetaAbstract): +class GraphicsDefn(BasePostObjectDefn, PyLocalNamedObject["Container"], abc.ABC): """Abstract base class for graphics objects.""" + @Command @abstractmethod - def display(self, window_id: str | None = None): + def display(self, window_id: str | None = None) -> None: """Display graphics. Parameters @@ -71,11 +93,11 @@ def display(self, window_id: str | None = None): pass -class PlotDefn(BasePostObjectDefn, metaclass=PyLocalNamedObjectMetaAbstract): +class PlotDefn(BasePostObjectDefn, PyLocalNamedObject["Container"], abc.ABC): """Abstract base class for plot objects.""" @abstractmethod - def plot(self, window_id: str | None = None): + def plot(self, window_id: str | None = None) -> None: """Draw plot. Parameters @@ -86,145 +108,156 @@ def plot(self, window_id: str | None = None): pass -class Vector(NamedTuple): - """Class for vector definition.""" - - x: float - y: float - z: float - - -class MonitorDefn(PlotDefn): +class MonitorDefn(PlotDefn, abc.ABC): """Monitor Definition.""" PLURAL = "Monitors" - class monitor_set_name(metaclass=PyLocalPropertyMeta): + @final + @if_type_checking_instantiate + class monitor_set_name(PyLocalProperty["MonitorDefn", str | None]): """Monitor set name.""" - value: str = None + value = None @Attribute - def allowed_values(self): + def allowed_values(self) -> list[str]: """Monitor set allowed values.""" return self.monitors.get_monitor_set_names() -class XYPlotDefn(PlotDefn): +class XYPlotDefn(PlotDefn, abc.ABC): """XYPlot Definition.""" PLURAL = "XYPlots" - class node_values(metaclass=PyLocalPropertyMeta): + @final + @if_type_checking_instantiate + class node_values(PyLocalProperty["XYPlotDefn", bool]): """Plot nodal values.""" - value: bool = True + value = True - class boundary_values(metaclass=PyLocalPropertyMeta): + @final + @if_type_checking_instantiate + class boundary_values(PyLocalProperty["XYPlotDefn", bool]): """Plot Boundary values.""" - value: bool = True + value = True - class direction_vector(metaclass=PyLocalPropertyMeta): + @final + @if_type_checking_instantiate + class direction_vector(PyLocalProperty["XYPlotDefn", tuple[int, int, int]]): """Direction Vector.""" - value: Vector = [1, 0, 0] + value = (1, 0, 0) - class y_axis_function(metaclass=PyLocalPropertyMeta): + @final + @if_type_checking_instantiate + class y_axis_function(PyLocalProperty["XYPlotDefn", str | None]): """Y Axis Function.""" - value: str = None + value = None @Attribute - def allowed_values(self): + def allowed_values(self) -> list[str]: """Y axis function allowed values.""" return list(self.field_data.scalar_fields()) - class x_axis_function(metaclass=PyLocalPropertyMeta): + @final + @if_type_checking_instantiate + class x_axis_function(PyLocalProperty["XYPlotDefn", Literal["direction-vector"]]): """X Axis Function.""" - value: str = "direction-vector" + value = "direction-vector" @Attribute - def allowed_values(self): + def allowed_values(self) -> Sequence[Literal["direction-vector"]]: """X axis function allowed values.""" return ["direction-vector"] - class surfaces(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class surfaces(PyLocalProperty["XYPlotDefn", list[str]]): """List of surfaces for plotting.""" - value: List[str] = [] + value = [] @Attribute - def allowed_values(self): + def allowed_values(self) -> list[str]: """Surface list allowed values.""" return list(self.field_data.surfaces()) + list( self.get_root()._local_surfaces_provider() ) -class MeshDefn(GraphicsDefn): +class MeshDefn(GraphicsDefn, abc.ABC): """Mesh graphics definition.""" PLURAL = "Meshes" - class surfaces(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class surfaces(PyLocalProperty["MeshDefn", list[str]]): """List of surfaces for mesh graphics.""" - value: List[str] = [] + value = [] @Attribute - def allowed_values(self): + def allowed_values(self) -> list[str]: """Surface list allowed values.""" return list(self.field_data.surfaces()) + list( self.get_root()._local_surfaces_provider() ) - class show_edges(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class show_edges(PyLocalProperty["MeshDefn", bool]): """Show edges for mesh.""" - value: bool = False + value = False - class show_nodes(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class show_nodes(PyLocalProperty["MeshDefn", bool]): """Show nodes for mesh.""" - value: bool = False + value = False - class show_faces(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class show_faces(PyLocalProperty["MeshDefn", bool]): """Show faces for mesh.""" - value: bool = True + value = True -class PathlinesDefn(GraphicsDefn): +class PathlinesDefn(GraphicsDefn, abc.ABC): """Pathlines definition.""" PLURAL = "Pathlines" - class field(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class field(PyLocalProperty["PathlinesDefn", str | None]): """Pathlines field.""" - value: str = None + value = None @Attribute - def allowed_values(self): + def allowed_values(self) -> list[str]: """Field allowed values.""" return list(self.field_data.scalar_fields()) - class surfaces(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class surfaces(PyLocalProperty["PathlinesDefn", list[str]]): """List of surfaces for pathlines.""" - value: List[str] = [] + value = [] @Attribute - def allowed_values(self): + def allowed_values(self) -> list[str]: """Surface list allowed values.""" return list(self.field_data.surfaces()) + list( self.get_root()._local_surfaces_provider() ) -class SurfaceDefn(GraphicsDefn): +class SurfaceDefn(GraphicsDefn, abc.ABC): """Surface graphics definition.""" PLURAL = "Surfaces" @@ -234,267 +267,346 @@ def name(self) -> str: """Return name of the surface.""" return self._name - class show_edges(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class show_edges(PyLocalProperty["SurfaceDefn", bool]): """Show edges for surface.""" - value: bool = True + value = True - class definition(metaclass=PyLocalObjectMeta): + class definition(PyLocalObject["SurfaceDefn"]): """Specify surface definition type.""" - class type(metaclass=PyLocalPropertyMeta): + @final + @if_type_checking_instantiate + class type( + PyLocalProperty["definition", Literal["plane-surface", "iso-surface"]] + ): """Surface type.""" - value: str = "iso-surface" + value = "iso-surface" @Attribute - def allowed_values(self): + def allowed_values( + self, + ) -> Sequence[Literal["plane-surface", "iso-surface"]]: """Surface type allowed values.""" return ["plane-surface", "iso-surface"] - class plane_surface(metaclass=PyLocalObjectMeta): + @if_type_checking_instantiate + class plane_surface(PyLocalObject["definition"]): """Plane surface definition.""" @Attribute - def is_active(self): + def is_active(self) -> bool: """Check whether current object is active or not.""" return self._parent.type() == "plane-surface" - class creation_method(metaclass=PyLocalPropertyMeta): + @final + @if_type_checking_instantiate + class creation_method( + PyLocalProperty[ + "plane_surface", + Literal["xy-plane", "yz-plane", "zx-plane", "point-and-normal"], + ] + ): """Creation Method.""" - value: str = "xy-plane" + value = "xy-plane" @Attribute - def allowed_values(self): + def allowed_values( + self, + ) -> Sequence[ + Literal["xy-plane", "yz-plane", "zx-plane", "point-and-normal"] + ]: """Surface type allowed values.""" return ["xy-plane", "yz-plane", "zx-plane", "point-and-normal"] - class point(metaclass=PyLocalObjectMeta): + @if_type_checking_instantiate + class point(PyLocalObject["plane_surface"]): """Point entry for point-and-normal surface.""" @Attribute - def is_active(self): + def is_active(self) -> bool: """Check whether current object is active or not.""" return self._parent.creation_method() == "point-and-normal" - class x(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class x(PyLocalProperty["point", float]): """X value.""" - value: float = 0 + value = 0 @Attribute - def range(self): + def range(self) -> tuple[float, float]: """X value range.""" - return self.field_data.scalar_fields.range("x-coordinate", True) + return cast( + tuple[float, float], + cast( + object, + self.field_data.scalar_fields.range( + "x-coordinate", True + ), + ), + ) - class y(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class y(PyLocalProperty["point", float]): """Y value.""" - value: float = 0 + value = 0 @Attribute - def range(self): + def range(self) -> tuple[float, float]: """Y value range.""" - return self.field_data.scalar_fields.range("y-coordinate", True) + return cast( + tuple[float, float], + cast( + object, + self.field_data.scalar_fields.range( + "y-coordinate", True + ), + ), + ) - class z(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class z(PyLocalProperty["point", float]): """Z value.""" - value: float = 0 + value = 0 @Attribute - def range(self): + def range(self) -> tuple[float, float]: """Z value range.""" - return self.field_data.scalar_fields.range("z-coordinate", True) + return cast( + tuple[float, float], + cast( + object, + self.field_data.scalar_fields.range( + "z-coordinate", True + ), + ), + ) - class normal(metaclass=PyLocalObjectMeta): + @if_type_checking_instantiate + class normal(PyLocalObject["plane_surface"]): """Normal entry for point-and-normal surface.""" @Attribute - def is_active(self): + def is_active(self) -> bool: """Check whether current object is active or not.""" return self._parent.creation_method() == "point-and-normal" - class x(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class x(PyLocalProperty["normal", float]): """X value.""" - value: float = 0 + value = 0 @Attribute - def range(self): + def range(self) -> tuple[int, int]: """X value range.""" - return [-1, 1] + return (-1, 1) - class y(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class y(PyLocalProperty["normal", float]): """Y value.""" - value: float = 0 + value = 0 @Attribute - def range(self): + def range(self) -> tuple[int, int]: """Y value range.""" - return [-1, 1] + return (-1, 1) - class z(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class z(PyLocalProperty["normal", float]): """Z value.""" - value: float = 0 + value = 0 @Attribute - def range(self): + def range(self) -> tuple[int, int]: """Z value range.""" - return [-1, 1] + return (-1, 1) - class xy_plane(metaclass=PyLocalObjectMeta): + @if_type_checking_instantiate + class xy_plane(PyLocalObject["plane_surface"]): """XY Plane definition.""" @Attribute - def is_active(self): + def is_active(self) -> bool: """Check whether current object is active or not.""" return self._parent.creation_method() == "xy-plane" - class z(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class z(PyLocalProperty["xy_plane", float]): """Z value.""" - value: float = 0 + value = 0 @Attribute - def range(self): + def range(self) -> tuple[float, float]: """Z value range.""" - return self.field_data.scalar_fields.range("z-coordinate", True) + return cast( + tuple[float, float], + cast( + object, + self.field_data.scalar_fields.range( + "z-coordinate", True + ), + ), + ) - class yz_plane(metaclass=PyLocalObjectMeta): + @if_type_checking_instantiate + class yz_plane(PyLocalObject["plane_surface"]): """YZ Plane definition.""" @Attribute - def is_active(self): + def is_active(self) -> bool: """Check whether current object is active or not.""" return self._parent.creation_method() == "yz-plane" - class x(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class x(PyLocalProperty["yz_plane", float]): """X value.""" - value: float = 0 + value = 0 @Attribute - def range(self): + def range(self) -> tuple[float, float]: """X value range.""" return self.field_data.scalar_fields.range("x-coordinate", True) - class zx_plane(metaclass=PyLocalObjectMeta): + @if_type_checking_instantiate + class zx_plane(PyLocalObject["plane_surface"]): """ZX Plane definition.""" @Attribute - def is_active(self): + def is_active(self) -> bool: """Check whether current object is active or not.""" return self._parent.creation_method() == "zx-plane" - class y(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class y(PyLocalProperty["zx_plane", float]): """Y value.""" - value: float = 0 + value = 0 @Attribute - def range(self): + def range(self) -> tuple[float, float]: """Y value range.""" return self.field_data.scalar_fields.range("y-coordinate", True) - class iso_surface(metaclass=PyLocalObjectMeta): + @if_type_checking_instantiate + class iso_surface(PyLocalObject["definition"]): """Iso surface definition.""" @Attribute - def is_active(self): + def is_active(self) -> bool: """Check whether current object is active or not.""" return self._parent.type() == "iso-surface" - class field(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class field(PyLocalProperty["iso_surface", str | None]): """Iso surface field.""" - value: str = None + value = None @Attribute - def allowed_values(self): + def allowed_values(self) -> list[str]: """Field allowed values.""" return list(self.field_data.scalar_fields()) - class rendering(metaclass=PyLocalPropertyMeta): + @final + @if_type_checking_instantiate + class rendering(PyLocalProperty["iso_surface", Literal["mesh", "contour"]]): """Iso surface rendering.""" - value: str = "mesh" + value = "mesh" @Attribute - def allowed_values(self): + def allowed_values(self) -> Sequence[Literal["mesh", "contour"]]: """Surface rendering allowed values.""" return ["mesh", "contour"] - class iso_value(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class iso_value(PyLocalProperty["iso_surface", float | None]): """Iso value for field.""" - _value: float = None + _value = None - def _reset_on_change(self): + def _reset_on_change(self) -> list[str | None]: return [self._parent.field] @property - def value(self): - """Iso value property setter.""" + def value(self) -> float | None: + """Iso value property.""" if getattr(self, "_value", None) is None: rnge = self.range self._value = (rnge[0] + rnge[1]) / 2.0 if rnge else None return self._value @value.setter - def value(self, value): + def value(self, value: float | None) -> None: self._value = value @Attribute - def range(self): + def range(self) -> tuple[float, float] | None: """Iso value range.""" field = self._parent.field() if field: - return self.field_data.scalar_fields.range(field, True) + return cast( + tuple[float, float], + cast( + object, self.field_data.scalar_fields.range(field, True) + ), + ) -class ContourDefn(GraphicsDefn): +class ContourDefn(GraphicsDefn, abc.ABC): """Contour graphics definition.""" PLURAL = "Contours" - class field(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class field(PyLocalProperty["ContourDefn", str | None]): """Contour field.""" - value: str = None + value = None @Attribute - def allowed_values(self): + def allowed_values(self) -> list[str]: """Field allowed values.""" return list(self.field_data.scalar_fields()) - class surfaces(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class surfaces(PyLocalProperty["ContourDefn", list[str]]): """Contour surfaces.""" - value: List[str] = [] + value = [] @Attribute - def allowed_values(self): + def allowed_values(self) -> list[str]: """Surfaces list allowed values.""" return list(self.field_data.surfaces()) + list( self.get_root()._local_surfaces_provider() ) - class filled(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class filled(PyLocalProperty["ContourDefn", bool]): """Draw filled contour.""" - value: bool = True + value = True - class node_values(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class node_values(PyLocalProperty["ContourDefn", bool]): """Draw nodal data.""" - _value: bool = True + _value = True @Attribute - def is_active(self): + def is_active(self) -> bool: """Check whether current object is active or not.""" filled = self.get_ancestors_by_type(ContourDefn).filled() auto_range_off = self.get_ancestors_by_type( @@ -508,87 +620,102 @@ def is_active(self): return True @property - def value(self): + def value(self) -> bool: """Node value property setter.""" if self.is_active is False: return True return self._value @value.setter - def value(self, value): + def value(self, value: bool) -> None: if value is False and self.is_active is False: raise ValueError( "For unfilled and clipped contours, node values must be displayed. " ) self._value = value - class boundary_values(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class boundary_values(PyLocalProperty["ContourDefn", bool]): """Draw boundary values.""" - value: bool = False + value = False - class contour_lines(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class contour_lines(PyLocalProperty["ContourDefn", bool]): """Draw contour lines.""" - value: bool = False + value = False - class show_edges(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class show_edges(PyLocalProperty["ContourDefn", bool]): """Show edges.""" - value: bool = False + value = False - class range(metaclass=PyLocalObjectMeta): + class range(PyLocalObject["ContourDefn"]): """Range definition.""" - class option(metaclass=PyLocalPropertyMeta): + @final + @if_type_checking_instantiate + class option( + PyLocalProperty["range", Literal["auto-range-on", "auto-range-off"]] + ): """Range option.""" - value: str = "auto-range-on" + value = "auto-range-on" @Attribute - def allowed_values(self): + def allowed_values( + self, + ) -> Sequence[Literal["auto-range-on", "auto-range-off"]]: """Range option allowed values.""" return ["auto-range-on", "auto-range-off"] - class auto_range_on(metaclass=PyLocalObjectMeta): + @if_type_checking_instantiate + class auto_range_on(PyLocalObject["range"]): """Auto range on definition.""" @Attribute - def is_active(self): + def is_active(self) -> bool: """Check whether current object is active or not.""" return self._parent.option() == "auto-range-on" - class global_range(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class global_range(PyLocalProperty["auto_range_on", bool]): """Show global range.""" - value: bool = False + value = False - class auto_range_off(metaclass=PyLocalObjectMeta): + @if_type_checking_instantiate + class auto_range_off(PyLocalObject["range"]): """Auto range off definition.""" @Attribute - def is_active(self): + def is_active(self) -> bool: """Check whether current object is active or not.""" return self._parent.option() == "auto-range-off" - class clip_to_range(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class clip_to_range(PyLocalProperty["auto_range_off", bool]): """Clip contour within range.""" - value: bool = False + value = False - class minimum(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class minimum(PyLocalProperty["auto_range_off", float | None]): """Range minimum.""" - _value: float = None + _value = None - def _reset_on_change(self): + def _reset_on_change(self) -> list[Callable[[], object]]: return [ self.get_ancestors_by_type(ContourDefn).field, self.get_ancestors_by_type(ContourDefn).node_values, ] @property - def value(self): + @override + def value(self) -> float | None: """Range minimum property setter.""" if getattr(self, "_value", None) is None: field = self.get_ancestors_by_type(ContourDefn).field() @@ -602,22 +729,24 @@ def value(self): return self._value @value.setter - def value(self, value): + def value(self, value: float | None) -> None: self._value = value - class maximum(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class maximum(PyLocalProperty["auto_range_off", float | None]): """Range maximum.""" - _value: float = None + _value = None - def _reset_on_change(self): + def _reset_on_change(self) -> list[Callable[[], object]]: return [ self.get_ancestors_by_type(ContourDefn).field, self.get_ancestors_by_type(ContourDefn).node_values, ] @property - def value(self): + @override + def value(self) -> float | None: """Range maximum property setter.""" if getattr(self, "_value", None) is None: field = self.get_ancestors_by_type(ContourDefn).field() @@ -632,108 +761,127 @@ def value(self): return self._value @value.setter - def value(self, value): + def value(self, value: float | None) -> None: self._value = value -class VectorDefn(GraphicsDefn): +class VectorDefn(GraphicsDefn, abc.ABC): """Vector graphics definition.""" PLURAL = "Vectors" - class vectors_of(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class vectors_of(PyLocalProperty["VectorDefn", str | None]): """Vector type.""" - value: str = None + value = None @Attribute - def allowed_values(self): + def allowed_values(self) -> list[str]: """Vectors of allowed values.""" return list(self.field_data.vector_fields()) - class field(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class field(PyLocalProperty["VectorDefn", str | None]): """Vector color field.""" - value: str = None + value = None @Attribute - def allowed_values(self): + def allowed_values(self) -> list[str]: """Field allowed values.""" return list(self.field_data.scalar_fields()) - class surfaces(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class surfaces(PyLocalProperty["VectorDefn", list[str]]): """List of surfaces for vector graphics.""" - value: List[str] = [] + value = [] @Attribute - def allowed_values(self): + def allowed_values(self) -> list[str]: """Surface list allowed values.""" return list(self.field_data.surfaces()) + list( self.get_root()._local_surfaces_provider() ) - class scale(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class scale(PyLocalProperty["VectorDefn", float]): """Vector scale.""" - value: float = 1.0 + value = 1.0 - class skip(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class skip(PyLocalProperty["VectorDefn", int]): """Vector skip.""" - value: int = 0 + value = 0 - class show_edges(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class show_edges(PyLocalProperty["VectorDefn", bool]): """Show edges.""" - value: bool = False + value = False - class range(metaclass=PyLocalObjectMeta): + @if_type_checking_instantiate + class range(PyLocalObject["VectorDefn"]): """Range definition.""" - class option(metaclass=PyLocalPropertyMeta): + @final + @if_type_checking_instantiate + class option( + PyLocalProperty["range", Literal["auto-range-on", "auto-range-off"]] + ): """Range option.""" - value: str = "auto-range-on" + value = "auto-range-on" @Attribute - def allowed_values(self): + def allowed_values( + self, + ) -> Sequence[Literal["auto-range-on", "auto-range-off"]]: """Range option allowed values.""" return ["auto-range-on", "auto-range-off"] - class auto_range_on(metaclass=PyLocalObjectMeta): + @if_type_checking_instantiate + class auto_range_on(PyLocalObject["range"]): """Auto range on definition.""" @Attribute - def is_active(self): + def is_active(self) -> bool: """Check whether current object is active or not.""" return self._parent.option() == "auto-range-on" - class global_range(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class global_range(PyLocalProperty["auto_range_on", bool]): """Show global range.""" - value: bool = False + value = False - class auto_range_off(metaclass=PyLocalObjectMeta): + @if_type_checking_instantiate + class auto_range_off(PyLocalObject["range"]): """Auto range off definition.""" @Attribute - def is_active(self): + def is_active(self) -> bool: """Check whether current object is active or not.""" return self._parent.option() == "auto-range-off" - class clip_to_range(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class clip_to_range(PyLocalProperty["auto_range_off", bool]): """Clip vector within range.""" - value: bool = False + value = False - class minimum(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class minimum(PyLocalProperty["auto_range_off", float | None]): """Range minimum.""" - _value: float = None + _value = None @property - def value(self): + @override + def value(self) -> float | None: """Range minimum property setter.""" if getattr(self, "_value", None) is None: field_data = self.field_data @@ -745,16 +893,17 @@ def value(self): return self._value @value.setter - def value(self, value): + def value(self, value: float | None) -> None: self._value = value - class maximum(metaclass=PyLocalPropertyMeta): + @if_type_checking_instantiate + class maximum(PyLocalProperty["auto_range_off", float | None]): """Range maximum.""" - _value: float = None + _value = None @property - def value(self): + def value(self) -> float | None: """Range maximum property setter.""" if getattr(self, "_value", None) is None: field_data = self.field_data @@ -766,5 +915,18 @@ def value(self): return self._value @value.setter - def value(self, value): + def value(self, value: float | None) -> None: self._value = value + + +Defns: TypeAlias = ( + GraphicsDefn + | PlotDefn + | MonitorDefn + | XYPlotDefn + | MeshDefn + | PathlinesDefn + | SurfaceDefn + | ContourDefn + | VectorDefn +) diff --git a/src/ansys/fluent/interface/post_objects/post_objects_container.py b/src/ansys/fluent/interface/post_objects/post_objects_container.py index a0449c94..6d15fea5 100644 --- a/src/ansys/fluent/interface/post_objects/post_objects_container.py +++ b/src/ansys/fluent/interface/post_objects/post_objects_container.py @@ -22,9 +22,37 @@ """Module providing visualization objects.""" +import builtins import inspect +import types +from typing import Any, ClassVar, Literal, TypeAlias, TypeVar -from ansys.fluent.interface.post_objects.meta import PyLocalContainer +from ansys.fluent.core.session import BaseSession +from ansys.fluent.core.session_solver import Solver +from typing_extensions import TypeIs + +from ansys.fluent.interface.post_objects.meta import ( + PyLocalContainer, + PyLocalNamedObject, +) +from ansys.fluent.interface.post_objects.post_helper import PostAPIHelper +from ansys.fluent.interface.post_objects.post_object_definitions import ( + ContourDefn, + MeshDefn, + MonitorDefn, + PathlinesDefn, + SurfaceDefn, + VectorDefn, + XYPlotDefn, +) + +LocalSurfacesProvider: TypeAlias = PyLocalContainer[SurfaceDefn] + +T = TypeVar("T") + + +def is_container(obj: Any) -> TypeIs["PyLocalContainer"]: + return isinstance(obj, PyLocalContainer) class Container: @@ -46,62 +74,59 @@ class Container: external modules (e.g., PyVista). Defaults to ``None``. """ + _sessions_state: ClassVar[dict[Solver, dict[str, Any]]] + def __init__( self, - session, - container_type, - module, - post_api_helper, - local_surfaces_provider=None, + session: Solver, + module: types.ModuleType, + post_api_helper: type[PostAPIHelper], + local_surfaces_provider: LocalSurfacesProvider | None = None, ): """__init__ method of Container class.""" - session_state = container_type._sessions_state.get(session) - self._path = container_type.__name__ + session_state = self.__class__._sessions_state.get(session) + self._path = self.__class__.__name__ if not session_state: session_state = self.__dict__ - container_type._sessions_state[session] = session_state + self.__class__._sessions_state[session] = session_state self.session = session self._init_module(self, module, post_api_helper) else: self.__dict__ = session_state - self._local_surfaces_provider = lambda: local_surfaces_provider or getattr( - self, "Surfaces", [] + self._local_surfaces_provider = lambda: ( + local_surfaces_provider or getattr(self, "Surfaces", {}) ) - def get_path(self): + def get_path(self) -> str: """Get container path.""" return self._path @property - def type(self): + def type(self) -> Literal["object"]: """Type.""" return "object" - def update(self, value): + def update(self, value: dict[str, Any]) -> None: """Update the value.""" for name, val in value.items(): o = getattr(self, name) o.update(val) - def __call__(self, show_attributes=False): - state = {} - for name, cls in self.__dict__.items(): - o = getattr(self, name) - if o is None or name.startswith("_") or name.startswith("__"): - continue - - if cls.__class__.__name__ == "PyLocalContainer": - container = o - if getattr(container, "is_active", True): - state[name] = {} - for child_name in container: - o = container[child_name] - if getattr(o, "is_active", True): - state[name][child_name] = o() + def __call__(self, show_attributes: bool = False) -> dict[str, Any]: + state: dict[str, Any] = {} + for name, container in inspect.getmembers(self, predicate=is_container): + if getattr(container, "is_active", True): + state[name] = {} + for child_name in container: + o = container[child_name] + if getattr(o, "is_active", True): + state[name][child_name] = o() return state - def _init_module(self, obj, mod, post_api_helper): + def _init_module( + self, obj, mod: types.ModuleType, post_api_helper: builtins.type[PostAPIHelper] + ): """ Dynamically initializes and attaches containers for classes in a module. @@ -116,34 +141,29 @@ def _init_module(self, obj, mod, post_api_helper): dynamically added to each container for creating and initializing new objects. """ # Iterate through all attributes in the module's dictionary - for name, cls in mod.__dict__.items(): - if cls.__class__.__name__ in ( - "PyLocalNamedObjectMetaAbstract", - ) and not inspect.isabstract(cls): + for name, cls in inspect.getmembers(mod, predicate=inspect.isclass): + if issubclass(cls, PyLocalNamedObject) and not inspect.isabstract(cls): cont = PyLocalContainer(self, cls, post_api_helper, cls.PLURAL) # Define a method to add a "create" function to the container - def _add_create(py_cont): - def _create(**kwargs): - new_object = py_cont.__getitem__( - py_cont._get_unique_chid_name() + def _create(**kwargs): + new_object = cont[cont._get_unique_child_name()] + state = new_object() + assert state is not None + # Validate that all kwargs are valid attributes for the object + unexpected_args = set(kwargs) - set(state) + if unexpected_args: + raise TypeError( + f"create() got an unexpected keyword argument '{next(iter(unexpected_args))}'." # noqa: E501 ) - # Validate that all kwargs are valid attributes for the object - unexpected_args = set(kwargs) - set(new_object()) - if unexpected_args: - raise TypeError( - f"create() got an unexpected keyword argument '{next(iter(unexpected_args))}'." # noqa: E501 - ) - for key, value in kwargs.items(): - if key == "surfaces": - value = list(value) - setattr(new_object, key, value) - return new_object - - return _create + for key, value in kwargs.items(): + if key == "surfaces": + value = list(value) + setattr(new_object, key, value) + return new_object # Attach the create method to the container - setattr(cont, "create", _add_create(cont)) + setattr(cont, "create", _create) # Attach the container to the parent object setattr( obj, @@ -178,13 +198,25 @@ class Plots(Container): Container for monitor plot objects. """ - _sessions_state = {} + _sessions_state: ClassVar[dict[BaseSession, dict[str, Any]]] = {} + XYPlots: PyLocalContainer[ # pyright: ignore[reportUninitializedInstanceVariable] + XYPlotDefn + ] + MonitorPlots: ( + PyLocalContainer[ # pyright: ignore[reportUninitializedInstanceVariable] + MonitorDefn + ] + ) - def __init__(self, session, module, post_api_helper, local_surfaces_provider=None): + def __init__( + self, + session: Solver, + module: types.ModuleType, + post_api_helper: type[PostAPIHelper], + local_surfaces_provider: LocalSurfacesProvider | None = None, + ): """__init__ method of Plots class.""" - super().__init__( - session, self.__class__, module, post_api_helper, local_surfaces_provider - ) + super().__init__(session, module, post_api_helper, local_surfaces_provider) class Graphics(Container): @@ -217,27 +249,47 @@ class Graphics(Container): Container for vector objects. """ - _sessions_state = {} + # TODO double triple check these local container types are correct cause something seems off vs Mesh + _sessions_state: ClassVar[dict[BaseSession, dict[str, Any]]] = {} + Meshes: PyLocalContainer[ # pyright: ignore[reportUninitializedInstanceVariable] + MeshDefn + ] + Surfaces: PyLocalContainer[ # pyright: ignore[reportUninitializedInstanceVariable] + SurfaceDefn + ] + Contours: PyLocalContainer[ # pyright: ignore[reportUninitializedInstanceVariable] + ContourDefn + ] + Vectors: PyLocalContainer[ # pyright: ignore[reportUninitializedInstanceVariable] + VectorDefn + ] + Pathlines: PyLocalContainer[ # pyright: ignore[reportUninitializedInstanceVariable] + PathlinesDefn + ] - def __init__(self, session, module, post_api_helper, local_surfaces_provider=None): + def __init__( + self, + session: Solver, + module: types.ModuleType, + post_api_helper: type[PostAPIHelper], + local_surfaces_provider: LocalSurfacesProvider | None = None, + ): """__init__ method of Graphics class.""" - super().__init__( - session, self.__class__, module, post_api_helper, local_surfaces_provider - ) + super().__init__(session, module, post_api_helper, local_surfaces_provider) - def add_outline_mesh(self): + def add_outline_mesh(self) -> MeshDefn | None: """Add a mesh outline. - Parameters - ---------- - None - Returns ------- - None + Mesh | None + The outline mesh object if it exists, otherwise ``None``. """ - meshes = getattr(self, "Meshes", None) - if meshes is not None: + try: + meshes = self.Meshes + except AttributeError: + return + else: outline_mesh_id = "mesh-outline" outline_mesh = meshes[outline_mesh_id] outline_mesh.surfaces = [ diff --git a/src/ansys/fluent/interface/post_objects/singleton_meta.py b/src/ansys/fluent/interface/post_objects/singleton_meta.py index dd139c74..6c2a7d7b 100644 --- a/src/ansys/fluent/interface/post_objects/singleton_meta.py +++ b/src/ansys/fluent/interface/post_objects/singleton_meta.py @@ -23,20 +23,23 @@ """Provides a module for metaclasses.""" from abc import ABCMeta +from typing import TYPE_CHECKING, Any, Self class SingletonMeta(type): """Provides the metaclass for the singleton type.""" - _single_instance = None + _single_instance: Self | None = None # pyright: ignore[reportGeneralTypeIssues] - def __call__(cls, *args, **kwargs): - if not cls._single_instance: - cls._single_instance = super(SingletonMeta, cls).__call__(*args, **kwargs) - return cls._single_instance + if ( + not TYPE_CHECKING + ): # some type checkers may see this and erase the type otherwise + + def __call__(cls, *args: Any, **kwargs: Any) -> Self: + if not cls._single_instance: + cls._single_instance = super().__call__(*args, **kwargs) + return cls._single_instance class AbstractSingletonMeta(ABCMeta, SingletonMeta): """Provides the metaclass for the abstract singleton type.""" - - pass diff --git a/src/ansys/fluent/visualization/__init__.py b/src/ansys/fluent/visualization/__init__.py index 22ccec85..528cac7d 100644 --- a/src/ansys/fluent/visualization/__init__.py +++ b/src/ansys/fluent/visualization/__init__.py @@ -22,13 +22,27 @@ """Python post processing integrations for the Fluent solver.""" -try: - import importlib.metadata as importlib_metadata -except ModuleNotFoundError: - import importlib_metadata +from importlib.metadata import version as _version + +from ansys.fluent.visualization.config import config as config +from ansys.fluent.visualization.config import get_config as get_config +from ansys.fluent.visualization.config import set_config as set_config +from ansys.fluent.visualization.containers import Contour as Contour +from ansys.fluent.visualization.containers import IsoSurface as IsoSurface +from ansys.fluent.visualization.containers import Mesh as Mesh +from ansys.fluent.visualization.containers import Monitor as Monitor +from ansys.fluent.visualization.containers import Pathline as Pathline +from ansys.fluent.visualization.containers import PlaneSurface as PlaneSurface +from ansys.fluent.visualization.containers import Surface as Surface +from ansys.fluent.visualization.containers import Vector as Vector +from ansys.fluent.visualization.containers import XYPlot as XYPlot +from ansys.fluent.visualization.graphics import Graphics as Graphics +from ansys.fluent.visualization.plotter import Plots as Plots +from ansys.fluent.visualization.registrar import register_renderer as register_renderer +from ansys.fluent.visualization.renderer import GraphicsWindow as GraphicsWindow _VERSION_INFO = None -__version__ = importlib_metadata.version(__name__.replace(".", "-")) +__version__ = _version(__name__.replace(".", "-")) def version_info() -> str: @@ -44,21 +58,3 @@ def version_info() -> str: Only available in packaged versions. Otherwise it will return __version__. """ return _VERSION_INFO if _VERSION_INFO is not None else __version__ - - -from ansys.fluent.visualization.config import config, get_config, set_config -from ansys.fluent.visualization.containers import ( # noqa: F401 - Contour, - IsoSurface, - Mesh, - Monitor, - Pathline, - PlaneSurface, - Surface, - Vector, - XYPlot, -) -from ansys.fluent.visualization.graphics import Graphics # noqa: F401 -from ansys.fluent.visualization.plotter import Plots # noqa: F401 -from ansys.fluent.visualization.registrar import register_renderer -from ansys.fluent.visualization.renderer import GraphicsWindow diff --git a/src/ansys/fluent/visualization/base/renderer.py b/src/ansys/fluent/visualization/base/renderer.py index dbc7a144..8825fe34 100644 --- a/src/ansys/fluent/visualization/base/renderer.py +++ b/src/ansys/fluent/visualization/base/renderer.py @@ -23,13 +23,32 @@ """Abstract module providing rendering functionality.""" from abc import ABC, abstractmethod +from collections.abc import Mapping, Sequence +from typing import Any, Generic, NotRequired, TypedDict + +from typing_extensions import TypeVar + +DataT = TypeVar("DataT", default=Any) + + +class SurfaceToRender(TypedDict, Generic[DataT]): + """TypedDict for mesh surface definition.""" + + data: DataT + position: NotRequired[tuple[int, int]] + opacity: NotRequired[float] + title: str + kwargs: Mapping[str, Any] + + +SubPlot = Sequence[SurfaceToRender[DataT]] class AbstractRenderer(ABC): """Abstract class for rendering graphics and plots.""" @abstractmethod - def render(self, meshes: list[list[dict]]) -> None: + def render(self, meshes: Sequence[SubPlot]) -> None: """Render graphics and plots in a window. Parameters @@ -49,7 +68,7 @@ def render(self, meshes: list[list[dict]]) -> None: - 'data': The mesh or 2d plot object to be plotted. - 'position': tuple(int, int), Location of subplot. Defaults to (0, 0). - - 'opacity': int, Sets the transparency of the subplot. Defaults to 1, + - 'opacity': float, Sets the transparency of the subplot. Defaults to 1, meaning fully opaque. - 'title': str, Title of the subplot. - 'kwargs': A dictionary of additional keyword arguments passed diff --git a/src/ansys/fluent/visualization/config.py b/src/ansys/fluent/visualization/config.py index e15d92f1..d93439ba 100644 --- a/src/ansys/fluent/visualization/config.py +++ b/src/ansys/fluent/visualization/config.py @@ -20,6 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. """Configuration variables for visualization.""" + from enum import Enum import os import warnings diff --git a/src/ansys/fluent/visualization/containers.py b/src/ansys/fluent/visualization/containers.py index b4c6361f..d2b5e88c 100644 --- a/src/ansys/fluent/visualization/containers.py +++ b/src/ansys/fluent/visualization/containers.py @@ -1,6 +1,9 @@ # Copyright (C) 2022 - 2026 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # +# Copyright (C) 2022 - 2025 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -21,11 +24,24 @@ # SOFTWARE. """Containers for graphics.""" + +import abc +from typing import ( + TYPE_CHECKING, + Any, + Generic, + Literal, + Required, + Self, + TypedDict, + Unpack, +) import warnings from ansys.fluent.core.field_data_interfaces import _to_field_name_str from ansys.fluent.core.utils.context_managers import _get_active_session from ansys.units import VariableDescriptor +from typing_extensions import TypeVar, override from ansys.fluent.visualization.graphics import Graphics from ansys.fluent.visualization.plotter import Plots @@ -34,37 +50,81 @@ XYPlotDataExtractor, ) +if TYPE_CHECKING: + from ansys.fluent.core.session_solver import Solver + + from ansys.fluent.interface.post_objects.meta import _DeleteKwargs + from ansys.fluent.interface.post_objects.post_object_definitions import ( + ContourDefn, + Defns, + MeshDefn, + MonitorDefn, + PathlinesDefn, + SurfaceDefn, + VectorDefn, + XYPlotDefn, + ) + from ansys.fluent.interface.post_objects.post_objects_container import Container + +DefnT = TypeVar("DefnT", bound="Defns", default="Defns") + -class _GraphicsContainer: +class _GraphicsContainer(Generic[DefnT]): """Base class for graphics containers.""" - def __init__(self, solver, **kwargs): + solver: "Solver" # pyright: ignore[reportUninitializedInstanceVariable] + _obj: "Defns" # pyright: ignore[reportUninitializedInstanceVariable] + kwargs: dict[str, Any] # pyright: ignore[reportUninitializedInstanceVariable] + + def __init__(self, solver: "Solver | None", **kwargs: Any): + super().__init__() self.__dict__["solver"] = solver or _get_active_session() self.__dict__["kwargs"] = kwargs - if self.solver is None: + if self.solver is None: # pyright: ignore[reportUnnecessaryComparison] raise RuntimeError("No solver session provided and none found in context.") if "field" in self.kwargs: - self.kwargs["field"] = _to_field_name_str(self.kwargs["field"]) + self.kwargs["field"] = kwargs["field"] = _to_field_name_str( + self.kwargs["field"] + ) if "vectors_of" in self.kwargs: - self.kwargs["vectors_of"] = _to_field_name_str(self.kwargs["vectors_of"]) + self.kwargs["vectors_of"] = kwargs["vectors_of"] = _to_field_name_str( + self.kwargs["vectors_of"] + ) def get_field_data(self): """Exposes field data.""" return FieldDataExtractor(self._obj).fetch_data() - def __getattr__(self, attr): - return getattr(self._obj, attr) - - def __setattr__(self, attr, value): - if attr == "surfaces": - value = list(value) - setattr(self._obj, attr, value) + if TYPE_CHECKING: + # we have these due to inheriting from the ABCs at type time but the attributes coming from ._obj + # the type checker thinks they aren't valid to instantiate otherwise + def get_root( + self, instance: object = None + ) -> Container: ... # pyright: ignore[reportUnusedParameter] + def display( + self, window_id: str | None = None + ) -> None: ... # pyright: ignore[reportUnusedParameter] + + surfaces: Any # pyright: ignore[reportUninitializedInstanceVariable] # something is definitely bugged here in the type checker as () -> list[str doesn't work] + else: + + def __getattr__(self, attr): + return getattr(self._obj, attr) + + @override + def __setattr__(self, attr, value): + if attr == "surfaces": # TODO typing? + value = list(value) + setattr(self._obj, attr, value) - def __dir__(self): + @override + def __dir__(self) -> list[str]: return sorted(set(super().__dir__()) | set(dir(self._obj))) -class Mesh(_GraphicsContainer): +class Mesh( # pyright: ignore[reportUnsafeMultipleInheritance] + _GraphicsContainer["MeshDefn"], MeshDefn if TYPE_CHECKING else abc.ABC +): """Mesh visualization object. Creates a Fluent mesh graphic object on the specified surfaces. @@ -96,22 +156,52 @@ class Mesh(_GraphicsContainer): """ def __init__( - self, surfaces: list[str], show_edges: bool = False, solver=None, **kwargs + self, + *, + surfaces: list[str], + show_edges: bool = False, + solver: "Solver | None" = None, + **kwargs: Unpack["_DeleteKwargs"], ): """__init__ method of Mesh class.""" - kwargs.update( - { - "show_edges": show_edges, + + super().__init__( + solver, + **kwargs + | { "surfaces": surfaces, - } + "show_edges": show_edges, + }, ) - super().__init__(solver, **kwargs) - self.__dict__["_obj"] = Graphics(session=self.solver).Meshes.create( - **self.kwargs + super().__setattr__( + "_obj", Graphics(session=self.solver).Meshes.create(**self.kwargs) ) -class Surface(_GraphicsContainer): +SurfaceType = Literal["plane-surface", "iso-surface"] +SurfaceCreationMethod = Literal["xy-plane", "yz-plane", "zx-plane", "point-and-normal"] +SurfaceRendering = Literal["mesh", "contour"] + + +class SurfaceKwargsNoType(TypedDict, total=False): + creation_method: SurfaceCreationMethod + x: float + y: float + z: float + field: str | VariableDescriptor + iso_value: float + rendering: SurfaceRendering + point: tuple[float, float, float] + normal: tuple[float, float, float] + + +class SurfaceKwargs(SurfaceKwargsNoType): + type: SurfaceType + + +class Surface( # pyright: ignore[reportUnsafeMultipleInheritance] + _GraphicsContainer["SurfaceDefn"], SurfaceDefn if TYPE_CHECKING else abc.ABC +): """Surface definition for Fluent post-processing. The ``Surface`` class represents any Fluent surface generated for @@ -160,89 +250,145 @@ class determines the session. >>> surf_outlet_plane.iso_value = -0.125017 """ - def __init__(self, type: str, solver=None, **kwargs): + _obj: "SurfaceDefn" # pyright: ignore[reportIncompatibleVariableOverride] + + def __init__( + self, *, solver: "Solver | None" = None, **kwargs: Unpack[SurfaceKwargs] + ): """__init__ method of Surface class.""" - kwargs.update( - { - "type": type, - } - ) super().__init__(solver, **kwargs) - self.__dict__.update( - dict( - type=self.kwargs.pop("type", None), - creation_method=self.kwargs.pop("creation_method", None), - x=self.kwargs.pop("x", None), - y=self.kwargs.pop("y", None), - z=self.kwargs.pop("z", None), - field=self.kwargs.pop("field", None), - iso_value=self.kwargs.pop("iso_value", None), - rendering=self.kwargs.pop("rendering", None), - point=self.kwargs.pop("point", None), - normal=self.kwargs.pop("normal", None), - _obj=Graphics(session=self.solver).Surfaces.create(**self.kwargs), - ) + super().__setattr__( + "_obj", Graphics(session=self.solver).Surfaces.create(**self.kwargs) ) - for attr in [ - "type", - "creation_method", - "x", - "y", - "z", - "field", - "iso_value", - "rendering", - "point", - "normal", - ]: - val = getattr(self, attr) - if val is not None: - setattr(self, attr, val) - - def __setattr__(self, attr, value): - if attr == "type": - self._obj.definition.type = value - elif attr == "creation_method": - self._obj.definition.plane_surface.creation_method = value - elif attr == "z": - if self._obj.definition.plane_surface.creation_method() != "xy-plane": - raise ValueError("Expected plane creation method to be 'xy-plane'") - self._obj.definition.plane_surface.xy_plane.z = value - elif attr == "y": - if self._obj.definition.plane_surface.creation_method() != "zx-plane": - raise ValueError("Expected plane creation method to be 'zx-plane'") - self._obj.definition.plane_surface.zx_plane.y = value - elif attr == "x": - if self._obj.definition.plane_surface.creation_method() != "yz-plane": - raise ValueError("Expected plane creation method to be 'yz-plane'") - self._obj.definition.plane_surface.yz_plane.x = value - elif attr == "field": - self._obj.definition.iso_surface.field = _to_field_name_str(value) - elif attr == "iso_value": - self._obj.definition.iso_surface.iso_value = value - elif attr == "rendering": - self._obj.definition.iso_surface.rendering = value - elif attr in ["point", "normal"]: - if ( - self._obj.definition.plane_surface.creation_method() - != "point-and-normal" - ): - raise ValueError( - "Expected plane creation method to be 'point-and-normal'" - ) - if attr == "point": - self._obj.definition.plane_surface.point.x = value[0] - self._obj.definition.plane_surface.point.y = value[1] - self._obj.definition.plane_surface.point.z = value[2] - elif attr == "normal": - self._obj.definition.plane_surface.normal.x = value[0] - self._obj.definition.plane_surface.normal.y = value[1] - self._obj.definition.plane_surface.normal.z = value[2] - else: - setattr(self._obj, attr, value) - - -class PlaneSurface(Surface): + self.type = kwargs["type"] + if "creation_method" in kwargs: + self.creation_method = kwargs["creation_method"] + if "x" in kwargs: + self.x = kwargs["x"] + if "y" in kwargs: + self.y = kwargs["y"] + if "z" in kwargs: + self.z = kwargs["z"] + if "field" in kwargs: + self.field = kwargs["field"] + if "iso_value" in kwargs: + self.iso_value = kwargs["iso_value"] + if "rendering" in kwargs: + self.rendering = kwargs["rendering"] + if "point" in kwargs: + self.point = kwargs["point"] + if "normal" in kwargs: + self.normal = kwargs["normal"] + + @property + @override + def type(self) -> SurfaceType: + """Surface definition type.""" + return self._obj.definition.type() + + @type.setter + def type(self, value: SurfaceType) -> None: + self._obj.definition.type = value + + @property + def creation_method( + self, + ) -> SurfaceCreationMethod: + """Plane surface creation method.""" + return self._obj.definition.plane_surface.creation_method() + + @creation_method.setter + def creation_method(self, value: SurfaceCreationMethod) -> None: + self._obj.definition.plane_surface.creation_method = value + + @property + def x(self) -> float: + """X coordinate for yz-plane.""" + return self._obj.definition.plane_surface.yz_plane.x() + + @x.setter + def x(self, value: float) -> None: + if self._obj.definition.plane_surface.creation_method() != "yz-plane": + raise ValueError("Expected plane creation method to be 'yz-plane'") + self._obj.definition.plane_surface.yz_plane.x = value + + @property + def y(self) -> float: + """Y coordinate for zx-plane.""" + return self._obj.definition.plane_surface.zx_plane.y() + + @y.setter + def y(self, value: float) -> None: + if self._obj.definition.plane_surface.creation_method() != "zx-plane": + raise ValueError("Expected plane creation method to be 'zx-plane'") + self._obj.definition.plane_surface.zx_plane.y = value + + @property + def z(self) -> float: + """Z coordinate for xy-plane.""" + return self._obj.definition.plane_surface.xy_plane.z() + + @z.setter + def z(self, value: float) -> None: + if self._obj.definition.plane_surface.creation_method() != "xy-plane": + raise ValueError("Expected plane creation method to be 'xy-plane'") + self._obj.definition.plane_surface.xy_plane.z = value + + @property + def field(self) -> str | None: + """Iso-surface field.""" + return self._obj.definition.iso_surface.field() + + @field.setter + def field(self, value: str | VariableDescriptor | None) -> None: + self._obj.definition.iso_surface.field = _to_field_name_str(value) + + @property + def iso_value(self) -> float | None: + """Iso-surface value.""" + return self._obj.definition.iso_surface.iso_value() + + @iso_value.setter + def iso_value(self, value: float | None) -> None: + self._obj.definition.iso_surface.iso_value = value + + @property + def rendering(self) -> SurfaceRendering: + """Iso-surface rendering method.""" + return self._obj.definition.iso_surface.rendering() + + @rendering.setter + def rendering(self, value: SurfaceRendering) -> None: + self._obj.definition.iso_surface.rendering = value + + @property + def point(self) -> tuple[float, float, float]: + """Point for point-and-normal surface.""" + pt = self._obj.definition.plane_surface.point + return (pt.x(), pt.y(), pt.z()) + + @point.setter + def point(self, value: tuple[float, float, float]) -> None: + if self._obj.definition.plane_surface.creation_method() != "point-and-normal": + raise ValueError("Expected plane creation method to be 'point-and-normal'") + pt = self._obj.definition.plane_surface.point + pt.x, pt.y, pt.z = value + + @property + def normal(self) -> tuple[float, float, float]: + """Normal vector for point-and-normal surface.""" + norm = self._obj.definition.plane_surface.normal + return (norm.x(), norm.y(), norm.z()) + + @normal.setter + def normal(self, value: tuple[float, float, float]) -> None: + if self._obj.definition.plane_surface.creation_method() != "point-and-normal": + raise ValueError("Expected plane creation method to be 'point-and-normal'") + norm = self._obj.definition.plane_surface.normal + norm.x, norm.y, norm.z = value + + +class PlaneSurface(Surface, abc.ABC): """PlaneSurface derived from Surface. Provides factory methods for creating plane surfaces like XY, YZ, and XZ planes. @@ -256,16 +402,19 @@ class PlaneSurface(Surface): >>> solver=solver_session, >>> point=[0.0, 0.0, -0.0441921], >>> normal=[0.0, 0.0, 1.0], - >>> ) + >>> ) + >>> >>> # Create same plane using 'create_xy_plane' method >>> surf_xy_plane = PlaneSurface.create_xy_plane( >>> solver=solver_session, >>> z=-0.0441921, - >>> ) + >>> ) """ @classmethod - def create_xy_plane(cls, solver=None, z: float = 0.0, **kwargs): + def create_xy_plane( + cls, *, solver: "Solver | None" = None, z: float = 0.0, **kwargs: Any + ) -> Self: """Create a plane surface in the XY plane at a given Z value.""" return cls( solver=solver, @@ -276,7 +425,9 @@ def create_xy_plane(cls, solver=None, z: float = 0.0, **kwargs): ) @classmethod - def create_yz_plane(cls, solver=None, x=0.0, **kwargs): + def create_yz_plane( + cls, solver: "Solver | None" = None, x: float = 0.0, **kwargs: Any + ) -> Self: """Create a plane surface in the YZ plane at a given X value.""" return cls( solver=solver, @@ -287,7 +438,9 @@ def create_yz_plane(cls, solver=None, x=0.0, **kwargs): ) @classmethod - def create_zx_plane(cls, solver=None, y=0.0, **kwargs): + def create_zx_plane( + cls, solver: "Solver | None" = None, y: float = 0.0, **kwargs: Any + ): """Create a plane surface in the ZX plane at a given Y value.""" return cls( solver=solver, @@ -299,13 +452,13 @@ def create_zx_plane(cls, solver=None, y=0.0, **kwargs): @classmethod def create_from_point_and_normal( - cls, solver=None, point=None, normal=None, **kwargs + cls, + solver: "Solver | None" = None, + point: tuple[float, float, float] = (0, 0, 0), + normal: tuple[float, float, float] = (0, 0, 0), + **kwargs: Any, ): """Create a plane surface from a point and a normal vector.""" - if normal is None: - normal = [0.0, 0.0, 0.0] - if point is None: - point = [0.0, 0.0, 0.0] return cls( solver=solver, type="plane-surface", @@ -316,7 +469,7 @@ def create_from_point_and_normal( ) -class IsoSurface(Surface): +class IsoSurface(Surface, abc.ABC): """Iso-surface derived from :class:`Surface`. The ``IsoSurface`` class simplifies creation of iso-surfaces by providing @@ -354,24 +507,36 @@ class IsoSurface(Surface): def __init__( self, - solver=None, - field: str | VariableDescriptor | None = None, - rendering: str | None = None, - iso_value: float | None = None, - **kwargs + solver: "Solver | None" = None, + **kwargs: Unpack[SurfaceKwargsNoType], ): """Create an iso-surface.""" super().__init__( solver=solver, type="iso-surface", - field=field, - rendering=rendering, - iso_value=iso_value, **kwargs, ) -class Contour(_GraphicsContainer): +class GenericCreateArgs(TypedDict, total=False): + name: str + + +class ContourKwargs(TypedDict, total=False): + field: str | VariableDescriptor + surfaces: list[str] + filled: bool + node_values: bool + boundary_values: bool + contour_lines: bool + show_edges: bool + + +class Contour( # pyright: ignore[reportUnsafeMultipleInheritance] + _GraphicsContainer["ContourDefn"], + ContourDefn if TYPE_CHECKING else abc.ABC, + abc.ABC, +): """ Contour visualization object. @@ -406,27 +571,30 @@ class Contour(_GraphicsContainer): >>> ) """ + _obj: "ContourDefn" # pyright: ignore[reportIncompatibleVariableOverride] + def __init__( - self, - field: str | VariableDescriptor, - surfaces: list[str], - solver=None, - **kwargs + self, *, solver: "Solver | None" = None, **kwargs: Unpack[ContourKwargs] ): """__init__ method of Contour class.""" - kwargs.update( - { - "field": field, - "surfaces": surfaces, - } - ) super().__init__(solver, **kwargs) - self.__dict__["_obj"] = Graphics(session=self.solver).Contours.create( - **self.kwargs + super().__setattr__( + "_obj", Graphics(session=self.solver).Contours.create(**self.kwargs) ) -class Vector(_GraphicsContainer): +# class VectorKwargs(TypedDict, total=False): +# field: Required[str | VariableDescriptor] +# surfaces: Required[list[str]] +# vectors_of: str | VariableDescriptor | None +# scale: float +# skip: int +# show_edges: bool + + +class Vector( # pyright: ignore[reportUnsafeMultipleInheritance] + _GraphicsContainer["VectorDefn"], VectorDefn if TYPE_CHECKING else abc.ABC, abc.ABC +): """Vector visualization object. Parameters @@ -460,30 +628,36 @@ class Vector(_GraphicsContainer): >>> ) """ + _obj: "VectorDefn" # pyright: ignore[reportIncompatibleVariableOverride] + def __init__( self, + *, field: str | VariableDescriptor, surfaces: list[str], color_by: str | VariableDescriptor | None = None, scale: float = 1.0, - solver=None, - **kwargs + skip: int = 0, + show_edges: bool = False, + solver: "Solver | None" = None, + # **kwargs: Unpack[VectorKwargs], ): """__init__ method of Vector class.""" if color_by is None: color_by = field - kwargs.update( - { - "vectors_of": field, - "field": color_by, - "surfaces": surfaces, - "scale": scale, - } + + super().__init__( + solver, + vectors_of=field, + field=color_by, + scale=scale, + skip=skip, + show_edges=show_edges, ) - super().__init__(solver, **kwargs) - self.__dict__["_obj"] = Graphics(session=self.solver).Vectors.create( - **self.kwargs + super().__setattr__( + "_obj", Graphics(session=self.solver).Vectors.create(**self.kwargs) ) + if field not in self._obj.vectors_of.allowed_values: warnings.warn( "API update: `field` now represents the vector variable, and `color_by`" @@ -494,26 +668,38 @@ def __init__( "Please update your code to: field=, color_by=." ) - @staticmethod - def _get_mapped_attrs(attr): - _attr_map = { - "field": "vectors_of", - "color_by": "field", - } - return _attr_map.get(attr) + if not TYPE_CHECKING: + + @staticmethod + def _get_mapped_attrs(attr: str) -> str | None: + _attr_map = { + "field": "vectors_of", + "color_by": "field", + } + return _attr_map.get(attr) + + def __getattr__(self, attr: str) -> Any: + attr = self._get_mapped_attrs(attr) or attr + return getattr(self._obj, attr) - def __getattr__(self, attr): - attr = self._get_mapped_attrs(attr) or attr - return getattr(self._obj, attr) + @override + def __setattr__(self, attr: str, value: Any) -> None: + attr = self._get_mapped_attrs(attr) or attr + if attr == "surfaces": + value = list(value) + setattr(self._obj, attr, value) - def __setattr__(self, attr, value): - attr = self._get_mapped_attrs(attr) or attr - if attr == "surfaces": - value = list(value) - setattr(self._obj, attr, value) +class PathlineKwargs(TypedDict, total=False): + field: Required[str | VariableDescriptor] + surfaces: Required[list[str]] -class Pathline(_GraphicsContainer): + +class Pathline( # pyright: ignore[reportUnsafeMultipleInheritance] + _GraphicsContainer["PathlinesDefn"], + PathlinesDefn if TYPE_CHECKING else abc.ABC, + abc.ABC, +): """Pathline visualization object. The ``Pathline`` class generates pathlines, which represent the trajectories @@ -549,27 +735,33 @@ class Pathline(_GraphicsContainer): >>> ) """ + _obj: "PathlinesDefn" # pyright: ignore[reportIncompatibleVariableOverride] + def __init__( self, - field: str | VariableDescriptor, - surfaces: list[str], - solver=None, - **kwargs + *, + solver: "Solver | None" = None, + **kwargs: Unpack[PathlineKwargs], ): """__init__ method of Pathline class.""" - kwargs.update( - { - "field": field, - "surfaces": surfaces, - } - ) super().__init__(solver, **kwargs) - self.__dict__["_obj"] = Graphics(session=self.solver).Pathlines.create( - **self.kwargs + super().__setattr__( + "_obj", Graphics(session=self.solver).Pathlines.create(**self.kwargs) ) -class XYPlot(_GraphicsContainer): +class XYPlotKwargs(TypedDict, total=False): + direction_vector: tuple[int, int, int] + node_values: bool + boundary_values: bool + x_axis_function: Literal["direction-vector"] + y_axis_function: Required[str | VariableDescriptor] + surfaces: Required[list[str]] + + +class XYPlot( # pyright: ignore[reportUnsafeMultipleInheritance] + _GraphicsContainer["XYPlotDefn"], XYPlotDefn if TYPE_CHECKING else abc.ABC, abc.ABC +): """XY plot visualization object. The ``XYPlot`` class creates a Fluent XY plot of a scalar field evaluated @@ -604,36 +796,41 @@ class XYPlot(_GraphicsContainer): >>> ) """ + _obj: "XYPlotDefn" # pyright: ignore[reportIncompatibleVariableOverride] + def __init__( self, - surfaces: list[str], - y_axis_function: str | VariableDescriptor, - solver=None, - local_surfaces_provider=None, - **kwargs + *, + solver: "Solver | None" = None, + **kwargs: Unpack[XYPlotKwargs], ): """__init__ method of XYPlot class.""" - kwargs.update( - { - "y_axis_function": y_axis_function, - "surfaces": surfaces, - } - ) super().__init__(solver, **kwargs) if "y_axis_function" in self.kwargs: self.kwargs["y_axis_function"] = _to_field_name_str( self.kwargs["y_axis_function"] ) - self.__dict__["_obj"] = Plots( - session=self.solver, local_surfaces_provider=Graphics(solver).Surfaces - ).XYPlots.create(**self.kwargs) + super().__setattr__( + "_obj", + Plots( + session=self.solver, local_surfaces_provider=Graphics(solver).Surfaces + ).XYPlots.create(**self.kwargs), + ) + + +class MonitorKwargs(TypedDict, total=False): + monitor_set_name: Required[str] def get_field_data(self): """Exposes 2d plot data data.""" return XYPlotDataExtractor(self._obj).fetch_data() -class Monitor(_GraphicsContainer): +class Monitor( # pyright: ignore[reportUnsafeMultipleInheritance] + _GraphicsContainer["MonitorDefn"], + MonitorDefn if TYPE_CHECKING else abc.ABC, + abc.ABC, +): """Monitor visualization object. The ``Monitor`` class provides access to Fluent monitor data for plotting, @@ -661,8 +858,14 @@ class Monitor(_GraphicsContainer): >>> residual = Monitor(solver=solver_session, monitor_set_name="residual") """ + _obj: "MonitorDefn" # pyright: ignore[reportIncompatibleVariableOverride] + def __init__( - self, monitor_set_name: str, solver=None, local_surfaces_provider=None, **kwargs + self, + *, + monitor_set_name: str, + solver: "Solver | None" = None, + **kwargs: Unpack[MonitorKwargs], ): """__init__ method of Monitor class.""" kwargs.update( @@ -671,9 +874,12 @@ def __init__( } ) super().__init__(solver, **kwargs) - self.__dict__["_obj"] = Plots( - session=self.solver, local_surfaces_provider=Graphics(solver).Surfaces - ).Monitors.create(**self.kwargs) + super().__setattr__( + "_obj", + Plots( + session=self.solver, local_surfaces_provider=Graphics(solver).Surfaces + ).MonitorPlots.create(**self.kwargs), + ) def get_field_data(self): """Exposes monitor data.""" diff --git a/src/ansys/fluent/visualization/contour.py b/src/ansys/fluent/visualization/contour.py index 6dc3fbcc..31d22ec2 100644 --- a/src/ansys/fluent/visualization/contour.py +++ b/src/ansys/fluent/visualization/contour.py @@ -22,7 +22,7 @@ """Contour objects based on field name and surfaces list.""" -from typing import List, Optional +from typing import Optional class Contour: @@ -57,7 +57,7 @@ def _error_check(self, solver): f"{surface} is not valid surface. Valid surfaces are {allowed_surfaces}" # noqa: E501 ) - def __init__(self, field: str, surfaces: List[str], solver: Optional = None): + def __init__(self, field: str, surfaces: list[str], solver: Optional = None): """Create contour using field name and surfaces list. Parameters @@ -95,25 +95,30 @@ def draw(self, solver, target): ------- Graphics or solver-based contour object. """ + from ansys.fluent.core.session_solver import Solver + + from ansys.fluent.visualization.graphics import Graphics + self._error_check(solver) graphics_mode = target existing_contours = ( solver.results.graphics.contour.get_object_names() - if graphics_mode.__class__.__name__ == "Solver" + if isinstance(graphics_mode, Solver) else graphics_mode.Contours.allowed_values() ) contour_name = self._get_contour_name() if contour_name not in existing_contours: - if graphics_mode.__class__.__name__ == "Graphics": + if isinstance(graphics_mode, Graphics): contour = graphics_mode.Contours[contour_name] contour.field = self.field contour.surfaces = self.surfaces contour.display() return contour - elif graphics_mode.__class__.__name__ == "Solver": + elif isinstance(graphics_mode, Solver): solver.results.graphics.contour[contour_name] = { "field": self.field, "surfaces": self.surfaces, } solver.results.graphics.contour.display(object_name=contour_name) return solver.results.graphics.contour[contour_name] + return solver.results.graphics.contour[contour_name] diff --git a/src/ansys/fluent/visualization/graphics/__init__.py b/src/ansys/fluent/visualization/graphics/__init__.py index 806b5c59..22505402 100644 --- a/src/ansys/fluent/visualization/graphics/__init__.py +++ b/src/ansys/fluent/visualization/graphics/__init__.py @@ -22,7 +22,7 @@ """A package that provides interfacing Fluent with graphics renderer (PyVista).""" -from ansys.fluent.visualization.graphics.graphics_objects import Graphics # noqa: F401 -from ansys.fluent.visualization.graphics.graphics_windows_manager import ( # noqa: F401 - graphics_windows_manager, +from ansys.fluent.visualization.graphics.graphics_objects import Graphics as Graphics +from ansys.fluent.visualization.graphics.graphics_windows_manager import ( + graphics_windows_manager as graphics_windows_manager, ) diff --git a/src/ansys/fluent/visualization/graphics/graphics_objects.py b/src/ansys/fluent/visualization/graphics/graphics_objects.py index 7c311ea9..fb3b164e 100644 --- a/src/ansys/fluent/visualization/graphics/graphics_objects.py +++ b/src/ansys/fluent/visualization/graphics/graphics_objects.py @@ -22,10 +22,11 @@ """Module providing visualization objects for PyVista.""" +from abc import ABC import sys -from typing import Optional +from typing import TYPE_CHECKING -from ansys.fluent.interface.post_objects.meta import Command +from ansys.fluent.interface.post_objects.meta import Command, PyLocalContainer from ansys.fluent.interface.post_objects.post_helper import PostAPIHelper from ansys.fluent.interface.post_objects.post_object_definitions import ( ContourDefn, @@ -37,10 +38,16 @@ from ansys.fluent.interface.post_objects.post_objects_container import ( Graphics as GraphicsContainer, ) +from ansys.fluent.interface.post_objects.post_objects_container import ( + LocalSurfacesProvider, +) from ansys.fluent.visualization.graphics.graphics_windows_manager import ( graphics_windows_manager, ) +if TYPE_CHECKING: + from ansys.fluent.core.session_solver import Solver + class Graphics(GraphicsContainer): """ @@ -49,14 +56,17 @@ class Graphics(GraphicsContainer): """ def __init__( - self, session, post_api_helper=PostAPIHelper, local_surfaces_provider=None + self, + session: "Solver", + post_api_helper: type[PostAPIHelper] = PostAPIHelper, + local_surfaces_provider: LocalSurfacesProvider | None = None, ): super().__init__( session, sys.modules[__name__], post_api_helper, local_surfaces_provider ) -class Mesh(MeshDefn): +class Mesh(MeshDefn, ABC): """Provides for displaying mesh graphics. Parameters @@ -80,7 +90,7 @@ class Mesh(MeshDefn): """ @Command - def display(self, window_id: Optional[str] = None, overlay: Optional[bool] = False): + def display(self, window_id: str | None = None, overlay: bool | None = False): """Display mesh graphics. Parameters @@ -97,7 +107,7 @@ def display(self, window_id: Optional[str] = None, overlay: Optional[bool] = Fal ) -class Pathlines(PathlinesDefn): +class Pathlines(PathlinesDefn, ABC): """Pathlines definition for PyVista. .. code-block:: python @@ -112,7 +122,7 @@ class Pathlines(PathlinesDefn): """ @Command - def display(self, window_id: Optional[str] = None, overlay: Optional[bool] = False): + def display(self, window_id: str | None = None, overlay: bool | None = False): """Display mesh graphics. Parameters @@ -129,7 +139,7 @@ def display(self, window_id: Optional[str] = None, overlay: Optional[bool] = Fal ) -class Surface(SurfaceDefn): +class Surface(SurfaceDefn, ABC): """Provides for displaying surface graphics. Parameters @@ -143,19 +153,21 @@ class Surface(SurfaceDefn): .. code-block:: python - from ansys.fluent.visualization import Graphics - - graphics_session = Graphics(session) - surface1 = graphics_session.Surfaces["surface-1"] - surface1.definition.type = "iso-surface" - surface1.definition.iso_surface.field= "velocity-magnitude" - surface1.definition.iso_surface.rendering= "contour" - surface1.definition.iso_surface.iso_value = 0.0 - surface1.display("window-0") + >>> from ansys.fluent.visualization import Graphics + >>> + >>> graphics_session = Graphics(session) + >>> surface1 = graphics_session.Surfaces["surface-1"] + >>> surface1.type = "iso-surface" + >>> surface1.iso_surface.field= "velocity-magnitude" + >>> surface1.iso_surface.rendering= "contour" + >>> surface1.iso_surface.iso_value = 0.0 + >>> surface1.display("window-0") """ @Command - def display(self, window_id: Optional[str] = None, overlay: Optional[bool] = False): + def display( + self, window_id: str | None = None, overlay: bool | None = False + ) -> None: """Display surface graphics. Parameters @@ -172,7 +184,7 @@ def display(self, window_id: Optional[str] = None, overlay: Optional[bool] = Fal ) -class Contour(ContourDefn): +class Contour(ContourDefn, ABC): """Provides for displaying contour graphics. Parameters @@ -196,7 +208,9 @@ class Contour(ContourDefn): """ @Command - def display(self, window_id: Optional[str] = None, overlay: Optional[bool] = False): + def display( + self, window_id: str | None = None, overlay: bool | None = False + ) -> None: """Display contour graphics. Parameters @@ -213,7 +227,7 @@ def display(self, window_id: Optional[str] = None, overlay: Optional[bool] = Fal ) -class Vector(VectorDefn): +class Vector(VectorDefn, ABC): """Provides for displaying vector graphics. Parameters @@ -238,7 +252,9 @@ class Vector(VectorDefn): """ @Command - def display(self, window_id: Optional[str] = None, overlay: Optional[bool] = False): + def display( + self, window_id: str | None = None, overlay: bool | None = False + ) -> None: """Display vector graphics. Parameters diff --git a/src/ansys/fluent/visualization/graphics/graphics_windows.py b/src/ansys/fluent/visualization/graphics/graphics_windows.py index fd04fb6a..09af8199 100644 --- a/src/ansys/fluent/visualization/graphics/graphics_windows.py +++ b/src/ansys/fluent/visualization/graphics/graphics_windows.py @@ -21,6 +21,7 @@ # SOFTWARE. """A wrapper to improve the user interface of graphics.""" + import ansys.fluent.visualization as pyviz from ansys.fluent.visualization.graphics import graphics_windows_manager diff --git a/src/ansys/fluent/visualization/graphics/graphics_windows_manager.py b/src/ansys/fluent/visualization/graphics/graphics_windows_manager.py index 7d85ff61..67eee731 100644 --- a/src/ansys/fluent/visualization/graphics/graphics_windows_manager.py +++ b/src/ansys/fluent/visualization/graphics/graphics_windows_manager.py @@ -25,7 +25,6 @@ from enum import Enum import itertools import threading -from typing import Dict, List, Optional import numpy as np import pyvista as pv @@ -63,8 +62,8 @@ def __init__( self, id: str, post_object: GraphicsDefn, - grid: tuple | None = (1, 1), - renderer: str = None, + grid: tuple[int, int] | None = (1, 1), + renderer: str | None = None, ): """Instantiate a Graphics window. @@ -130,23 +129,27 @@ def _get_renderer(self, renderer_string=None): raise KeyError(error_message) from ex return renderer(self.id, in_jupyter(), not pyviz.config.interactive, self._grid) - def set_data(self, data_type: FieldDataType, data: Dict[int, Dict[str, np.array]]): + def set_data( + self, data_type: FieldDataType, data: dict[int, dict[str, np.ndarray]] + ): """Set data for graphics.""" self._data[data_type] = data def fetch(self): """Fetch data for graphics.""" + from ansys.fluent.visualization.containers import Monitor, Surface, XYPlot + if not self.post_object: return obj = self.post_object - if obj.__class__.__name__ == "Surface": + if isinstance(obj, Surface): self._fetch_surface(obj) - elif obj.__class__.__name__ == "XYPlot": + elif isinstance(obj, XYPlot): self._fetch_xy_data(obj) - elif obj.__class__.__name__ == "MonitorPlot": + elif isinstance(obj, Monitor): self._fetch_monitor_data(obj) else: - self._fetch_data(obj, FieldDataType(obj.__class__.__name__)) + self._fetch_data(obj, FieldDataType(obj.__name__)) def render(self): """Render graphics.""" @@ -156,25 +159,35 @@ def render(self): def _render_graphics(self, obj_dict=None): """Render graphics.""" + from ansys.fluent.visualization.containers import ( + Contour, + Mesh, + Monitor, + Pathline, + Surface, + Vector, + XYPlot, + ) + if not self.post_object: return obj = self.post_object if not self.overlay: self.renderer._clear_plotter(in_jupyter()) - if obj.__class__.__name__ == "Mesh": + if isinstance(obj, Mesh): self._display_mesh(obj, obj_dict) - elif obj.__class__.__name__ == "Surface": + elif isinstance(obj, Surface): self._display_surface(obj, obj_dict) - elif obj.__class__.__name__ == "Contour": + elif isinstance(obj, Contour): self._display_contour(obj, obj_dict) - elif obj.__class__.__name__ == "Vector": + elif isinstance(obj, Vector): self._display_vector(obj, obj_dict) - elif obj.__class__.__name__ == "Pathlines": + elif isinstance(obj, Pathline): self._display_pathlines(obj, obj_dict) - elif obj.__class__.__name__ == "XYPlot": + elif isinstance(obj, XYPlot): self._display_xy_plot(obj_dict) - elif obj.__class__.__name__ == "MonitorPlot": + elif isinstance(obj, Monitor): self._display_monitor_plot(obj_dict) if self.animate: self.renderer.write_frame() @@ -653,10 +666,10 @@ class GraphicsWindowsManager(metaclass=AbstractSingletonMeta): def __init__(self): """Instantiate ``GraphicsWindow`` for Graphics.""" - self._post_windows: Dict[str:GraphicsWindow] = {} + self._post_windows: dict[str:GraphicsWindow] = {} self._plotter_thread: threading.Thread = None self._post_object: GraphicsDefn = None - self._window_id: Optional[str] = None + self._window_id: str | None = None self._exit_thread: bool = False self._app = None self._post_objects_list = [] @@ -753,9 +766,9 @@ def save_graphic( def refresh_windows( self, - session_id: Optional[str] = "", + session_id: str | None = "", windows_id=None, - overlay: Optional[bool] = False, + overlay: bool | None = False, ) -> None: """Refresh windows. @@ -784,7 +797,7 @@ def refresh_windows( def animate_windows( self, - session_id: Optional[str] = "", + session_id: str | None = "", windows_id=None, ) -> None: """Animate windows. @@ -816,7 +829,7 @@ def animate_windows( def close_windows( self, - session_id: Optional[str] = "", + session_id: str | None = "", windows_id=None, ) -> None: """Close windows. @@ -846,9 +859,9 @@ def close_windows( def _get_windows_id( self, - session_id: Optional[str] = "", + session_id: str | None = "", windows_id=None, - ) -> List[str]: + ) -> list[str]: if windows_id is None: windows_id = [] with self._condition: @@ -884,7 +897,6 @@ def _get_unique_window_id(self) -> str: class NonInteractiveGraphicsManager( GraphicsWindowsManager, VisualizationWindowsManager ): - def open_window( self, window_id: str | None = None, @@ -916,9 +928,9 @@ def open_window( def plot( self, graphics_object: GraphicsDefn, - window_id: Optional[str] = None, - fetch_data: Optional[bool] = False, - overlay: Optional[bool] = False, + window_id: str | None = None, + fetch_data: bool | None = False, + overlay: bool | None = False, ) -> None: """Draw a plot. @@ -995,7 +1007,6 @@ def _show_graphics_in_notebook(self, window_id: str): class InteractiveGraphicsManager(GraphicsWindowsManager, VisualizationWindowsManager): - def open_window( self, window_id: str | None = None, @@ -1027,9 +1038,9 @@ def open_window( def plot( self, graphics_object: GraphicsDefn, - window_id: Optional[str] = None, - fetch_data: Optional[bool] = False, - overlay: Optional[bool] = False, + window_id: str | None = None, + fetch_data: bool | None = False, + overlay: bool | None = False, ) -> None: """Draw a plot. diff --git a/src/ansys/fluent/visualization/graphics/pyvista/renderer.py b/src/ansys/fluent/visualization/graphics/pyvista/renderer.py index c4fbcb45..474d40e2 100644 --- a/src/ansys/fluent/visualization/graphics/pyvista/renderer.py +++ b/src/ansys/fluent/visualization/graphics/pyvista/renderer.py @@ -21,21 +21,51 @@ # SOFTWARE. """Module for pyVista windows management.""" + +from collections.abc import Mapping, Sequence +import importlib.util +from typing import TYPE_CHECKING, Any, TypedDict, cast + import numpy as np +import numpy.typing as npt import pyvista as pv +from typing_extensions import override import ansys.fluent.visualization as pyviz +from ansys.fluent.visualization.base.renderer import AbstractRenderer, SubPlot + +if TYPE_CHECKING: + from ansys.fluent.visualization.config import View + + +if importlib.util.find_spec("pyvistaqt") is None and pyviz.config.interactive: + raise ModuleNotFoundError( + "Missing dependencies, use 'pip install ansys-fluent-visualization[interactive]' to install them.", + name="pyvistaqt", + ) + + +class CurveData(TypedDict): + """TypedDict for individual curve data in a 2D chart.""" + + xvalues: npt.NDArray[np.floating[Any]] + yvalues: npt.NDArray[np.floating[Any]] + + +class MeshProperties(TypedDict, total=False): + """TypedDict for mesh properties.""" + + title: str + xlabel: str + ylabel: str + yscale: str -try: - from pyvistaqt import BackgroundPlotter -except ModuleNotFoundError as ex: - if pyviz.config.interactive: - raise ModuleNotFoundError( - "Missing dependencies, " - "use 'pip install ansys-fluent-visualization[interactive]' to install them." - ) from ex -from ansys.fluent.visualization.base.renderer import AbstractRenderer +class MeshDict(TypedDict, total=False): + """TypedDict for mesh dictionary containing chart data.""" + + properties: MeshProperties + kwargs: dict[str, Any] class Renderer(AbstractRenderer): @@ -44,17 +74,20 @@ def __init__( win_id: str, in_jupyter: bool, non_interactive: bool, - grid: tuple | None = (1, 1), + grid: tuple[int, int] | str = (1, 1), ): - self.plotter: BackgroundPlotter | pv.Plotter = ( - pv.Plotter(title=f"PyFluent ({win_id})", shape=grid) - if in_jupyter or non_interactive - else BackgroundPlotter( + if in_jupyter or non_interactive: + self.plotter = pv.Plotter(title=f"PyFluent ({win_id})", shape=grid) + else: + from pyvistaqt import ( # pyright: ignore[reportMissingTypeStubs] + BackgroundPlotter, + ) + + self.plotter = BackgroundPlotter( title=f"PyFluent ({win_id})", shape=grid, show=False if pyviz.config.single_window else True, ) - ) self._init_properties() self._colors = { "red": [255, 0, 0], @@ -76,45 +109,55 @@ def __init__( "white": [255, 255, 255], } - def _init_properties(self): + def _init_properties(self) -> None: self.plotter.theme.cmap = "jet" - self.plotter.background_color = "white" + self.plotter.background_color = "white" # pyright: ignore[reportAttributeAccessIssue] # types are inferred wrong self.plotter.theme.font.color = "black" - def _scalar_bar_default_properties(self) -> dict: - return dict( - title_font_size=20, - label_font_size=16, - shadow=True, - fmt="%.6e", - font_family="arial", - vertical=True, - position_x=0.06, - position_y=0.3, - ) - - def _clear_plotter(self, in_jupyter): + def _scalar_bar_default_properties(self) -> Mapping[str, object]: + return { + "title_font_size": 20, + "label_font_size": 16, + "shadow": True, + "fmt": "%.6e", + "font_family": "arial", + "vertical": True, + "position_x": 0.06, + "position_y": 0.3, + } + + def _clear_plotter(self, in_jupyter: bool) -> None: if in_jupyter and self.plotter.theme._jupyter_backend == "pythreejs": - self.plotter.remove_actor(self.plotter.renderer.actors.copy()) + assert isinstance( + self.plotter, pv.Plotter + ) # not sure why this isn't narrowing + plotter = cast(pv.Plotter, self.plotter) + plotter.remove_actor( + plotter.renderer.actors.copy() + ) # pyright: ignore[reportArgumentType] # remove_actor uses functools.wraps internally which isn't typed for methods else: self.plotter.clear() - def _set_camera(self, view: str): - camera = self.plotter.camera.copy() - view_fun = getattr(self.plotter, f"view_{view}", None) + def _set_camera(self, view: View) -> None: + assert isinstance(self.plotter, pv.Plotter) # not sure why this isn't narrowing + plotter = cast(pv.Plotter, self.plotter) + camera = plotter.camera.copy() + view_fun = getattr(plotter, f"view_{view}", None) if view_fun: view_fun() else: - self.plotter.camera = camera.copy() + plotter.camera = camera.copy() def write_frame(self): self.plotter.write_frame() + @override def show(self): """Show graphics.""" self.plotter.show() - def render(self, meshes: list[list[dict]]): + @override + def render(self, meshes: Sequence[SubPlot[pv.DataSet | Mapping[str, CurveData]]]): """Render graphics in window. Parameters @@ -126,16 +169,18 @@ def render(self, meshes: list[list[dict]]): self.plotter.clear() for mesh_sub_item in meshes: for mesh_dict in mesh_sub_item: - mesh = mesh_dict.pop("data") - if "position" in mesh_dict: - self.plotter.subplot( - mesh_dict["position"][0], mesh_dict["position"][1] - ) - del mesh_dict["position"] + mesh = mesh_dict["data"] + position = mesh_dict.get("position") + kwargs = mesh_dict.get("kwargs", {}) + + if position: + self.plotter.subplot(position[0], position[1]) + if isinstance(mesh, pv.DataSet): if mesh.n_points > 0: - mesh_dict.update(mesh_dict.pop("kwargs")) - self.plotter.add_mesh(mesh, **mesh_dict) + self.plotter.add_mesh( + mesh, **kwargs + ) # pyright: ignore[reportAny] else: y_range = None chart = pv.Chart2D() @@ -145,7 +190,6 @@ def render(self, meshes: list[list[dict]]): if mesh["properties"].get("yscale") == "log": chart.y_axis.log_scale = True y_range = 0 - del mesh["properties"] color_list = ["b", "r", "g", "c", "m", "y", "k"] style_list = ["-", "--", "-.", "-.."] @@ -153,8 +197,8 @@ def render(self, meshes: list[list[dict]]): min_y_value = max_y_value = min_x_value = max_x_value = None for count, curve in enumerate(mesh): chart.line( - mesh[curve]["xvalues"].tolist(), - mesh[curve]["yvalues"].tolist(), + mesh[curve]["xvalues"], + mesh[curve]["yvalues"], width=2.5, color=color_list[count % len(color_list)], style=style_list[count % len(style_list)], @@ -189,11 +233,14 @@ def render(self, meshes: list[list[dict]]): min_y_value - y_range * 0.2, max_y_value + y_range * 0.2, ] - mesh_dict.update(mesh_dict.pop("kwargs")) - if "title" in mesh_dict: - chart.title = mesh_dict.pop("title") - self.plotter.add_chart(chart, **mesh_dict) + chart.title = mesh_dict["title"] + self.plotter.add_chart( # add_chart uses functools.wraps internally which isn't typed for methods + chart, + **kwargs, # pyright: ignore[reportArgumentType] + ) + + @override def save_graphic(self, file_name: str): """Save graphics to the specified file. @@ -214,6 +261,7 @@ def get_animation(self, win_id: str): """ self.plotter.open_gif(f"{win_id}.gif") + @override def close(self): """Close graphics window.""" self.plotter.close() diff --git a/src/ansys/fluent/visualization/plotter/__init__.py b/src/ansys/fluent/visualization/plotter/__init__.py index 856d2863..ef336794 100644 --- a/src/ansys/fluent/visualization/plotter/__init__.py +++ b/src/ansys/fluent/visualization/plotter/__init__.py @@ -22,7 +22,7 @@ """A package that provides interfacing Fluent with plotters (matplotlib or pyvista).""" -from ansys.fluent.visualization.plotter.plotter_objects import Plots # noqa: F401 -from ansys.fluent.visualization.plotter.plotter_windows_manager import ( # noqa: F401 - plotter_windows_manager, +from ansys.fluent.visualization.plotter.plotter_objects import Plots as Plots +from ansys.fluent.visualization.plotter.plotter_windows_manager import ( + plotter_windows_manager as plotter_windows_manager, ) diff --git a/src/ansys/fluent/visualization/plotter/matplotlib/renderer.py b/src/ansys/fluent/visualization/plotter/matplotlib/renderer.py index 47f233aa..7b0a0725 100644 --- a/src/ansys/fluent/visualization/plotter/matplotlib/renderer.py +++ b/src/ansys/fluent/visualization/plotter/matplotlib/renderer.py @@ -22,8 +22,6 @@ """Module providing matplotlib plotter functionality.""" -from typing import List, Optional - import matplotlib.pyplot as plt import numpy as np @@ -36,12 +34,12 @@ class Plotter(AbstractRenderer): def __init__( self, window_id: str, - curves: List[str] | None = None, + curves: list[str] | None = None, title: str | None = "XY Plot", xlabel: str | None = "position", ylabel: str | None = "", - remote_process: Optional[bool] = False, - grid: tuple | None = (1, 1), + remote_process: bool | None = False, + grid: tuple[int, int] | None = (1, 1), ): """Instantiate a matplotlib plotter. @@ -63,6 +61,8 @@ def __init__( Subplot indices. remote_process: bool, optional Is remote process. + grid: tuple[int, int], optional + Grid layout for subplots. """ self._curves = [] if curves is None else curves self._title = title @@ -249,7 +249,7 @@ class ProcessPlotter(Plotter): def __init__( self, window_id, - curves_name: List[str] | None = None, + curves_name: list[str] | None = None, title: str | None = "XY Plot", xlabel: str | None = "position", ylabel: str | None = "", diff --git a/src/ansys/fluent/visualization/plotter/plotter_objects.py b/src/ansys/fluent/visualization/plotter/plotter_objects.py index 5ee7ccc0..638437e6 100644 --- a/src/ansys/fluent/visualization/plotter/plotter_objects.py +++ b/src/ansys/fluent/visualization/plotter/plotter_objects.py @@ -23,14 +23,17 @@ """Module providing visualization objects for Matplotlib.""" import sys -from typing import Optional from ansys.fluent.interface.post_objects.meta import Command from ansys.fluent.interface.post_objects.post_helper import PostAPIHelper from ansys.fluent.interface.post_objects.post_object_definitions import ( MonitorDefn, + SurfaceDefn, XYPlotDefn, ) +from ansys.fluent.interface.post_objects.post_objects_container import ( + LocalSurfacesProvider, +) from ansys.fluent.interface.post_objects.post_objects_container import ( Plots as PlotsContainer, ) @@ -46,7 +49,10 @@ class Plots(PlotsContainer): """ def __init__( - self, session, post_api_helper=PostAPIHelper, local_surfaces_provider=None + self, + session, + post_api_helper: type[PostAPIHelper] = PostAPIHelper, + local_surfaces_provider: LocalSurfacesProvider | None = None, ): super().__init__( session, sys.modules[__name__], post_api_helper, local_surfaces_provider @@ -77,7 +83,7 @@ class XYPlot(XYPlotDefn): """ @Command - def plot(self, window_id: Optional[str] = None): + def plot(self, window_id: str | None = None): """Draw XYPlot. Parameters @@ -112,7 +118,7 @@ class MonitorPlot(MonitorDefn): """ @Command - def plot(self, window_id: Optional[str] = None): + def plot(self, window_id: str | None = None): """Draw Monitor Plot. Parameters diff --git a/src/ansys/fluent/visualization/plotter/plotter_windows_manager.py b/src/ansys/fluent/visualization/plotter/plotter_windows_manager.py index 25248a0f..6d8d81c5 100644 --- a/src/ansys/fluent/visualization/plotter/plotter_windows_manager.py +++ b/src/ansys/fluent/visualization/plotter/plotter_windows_manager.py @@ -24,7 +24,7 @@ import itertools import multiprocessing as mp -from typing import Dict, List, Optional, Union +from typing import Union from ansys.fluent.core.fluent_connection import FluentConnection @@ -121,7 +121,7 @@ def __init__( self.id: str = id self.post_object = None self._grid = grid - self.plotter: Union[_ProcessPlotterHandle, "Plotter"] = self._get_plotter( + self.plotter: _ProcessPlotterHandle | Plotter = self._get_plotter( plotter_string=renderer ) self.close: bool = False @@ -131,10 +131,12 @@ def __init__( def plot(self, grid=(1, 1), position=(0, 0), show=True, subplot_titles=None): """Draw a plot.""" + from ansys.fluent.visualization.containers import XYPlot + if self.post_object is not None: plot = ( _XYPlot(self.post_object, self.plotter) - if self.post_object.__class__.__name__ == "XYPlot" + if isinstance(self.post_object, XYPlot) else _MonitorPlot(self.post_object, self.plotter) ) plot_data = plot() @@ -152,6 +154,8 @@ def plot(self, grid=(1, 1), position=(0, 0), show=True, subplot_titles=None): self.plotter.show() def plot_graphics(self, object_list): + from ansys.fluent.visualization.containers import XYPlot + self._obj_list = object_list if self.refresh: self._object_list_to_render = [] @@ -159,7 +163,7 @@ def plot_graphics(self, object_list): self.post_object = obj_dict["object"]._obj plot = ( _XYPlot(self.post_object, self.plotter) - if self.post_object.__class__.__name__ == "XYPlot" + if isinstance(self.post_object, XYPlot) else _MonitorPlot(self.post_object, self.plotter) ) @@ -226,7 +230,7 @@ def __init__( Plotter to plot the data. """ self.post_object: XYPlotDefn = post_object - self.plotter: Union[_ProcessPlotterHandle, "Plotter"] = plotter + self.plotter: _ProcessPlotterHandle | Plotter = plotter def __call__(self): """Draw an XY plot.""" @@ -258,7 +262,7 @@ def __init__( Plotter to plot the data. """ self.post_object: MonitorDefn = post_object - self.plotter: Union[_ProcessPlotterHandle, "Plotter"] = plotter + self.plotter: _ProcessPlotterHandle | Plotter = plotter def __call__(self): """Draw a monitor plot.""" @@ -289,7 +293,7 @@ class PlotterWindowsManager( def __init__(self): """Instantiate a windows manager for the plotter.""" - self._post_windows: Dict[str, PlotterWindow] = {} + self._post_windows: dict[str, PlotterWindow] = {} def open_window( self, @@ -343,7 +347,7 @@ def set_object_for_window(self, object: PlotDefn, window_id: str) -> None: def plot( self, object: PlotDefn, - window_id: Optional[str] = None, + window_id: str | None = None, grid=(1, 1), position=(0, 0), subplot_titles=None, @@ -413,9 +417,9 @@ def save_graphic( def refresh_windows( self, - session_id: Optional[str] = "", + session_id: str | None = "", windows_id=None, - overlay: Optional[bool] = None, + overlay: bool | None = None, ) -> None: """Refresh windows. @@ -440,7 +444,7 @@ def refresh_windows( def animate_windows( self, - session_id: Optional[str] = "", + session_id: str | None = "", windows_id=None, ) -> None: """Animate windows. @@ -465,7 +469,7 @@ def animate_windows( def close_windows( self, - session_id: Optional[str] = "", + session_id: str | None = "", windows_id=None, ) -> None: """Close windows. @@ -510,9 +514,9 @@ def _open_window( def _get_windows_id( self, - session_id: Optional[str] = "", + session_id: str | None = "", windows_id=None, - ) -> List[str]: + ) -> list[str]: if windows_id is None: windows_id = [] return [ diff --git a/src/ansys/fluent/visualization/plotter/pyvista/renderer.py b/src/ansys/fluent/visualization/plotter/pyvista/renderer.py index 688d9061..e065b8b1 100644 --- a/src/ansys/fluent/visualization/plotter/pyvista/renderer.py +++ b/src/ansys/fluent/visualization/plotter/pyvista/renderer.py @@ -20,7 +20,6 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -from typing import List, Optional import numpy as np import pyvista as pv @@ -34,11 +33,11 @@ class Plotter(AbstractRenderer): def __init__( self, window_id: str, - curves: Optional[List[str]] = None, - title: Optional[str] = "XY Plot", - xlabel: Optional[str] = "position", - ylabel: Optional[str] = "", - remote_process: Optional[bool] = False, + curves: list[str] | None = None, + title: str | None = "XY Plot", + xlabel: str | None = "position", + ylabel: str | None = "", + remote_process: bool | None = False, grid: tuple | None = (1, 1), ): """Instantiate a pyvista chart 2D plotter. diff --git a/src/ansys/fluent/visualization/post_data_extractor.py b/src/ansys/fluent/visualization/post_data_extractor.py index d36ef921..46747e2b 100644 --- a/src/ansys/fluent/visualization/post_data_extractor.py +++ b/src/ansys/fluent/visualization/post_data_extractor.py @@ -23,7 +23,6 @@ """Module providing data extractor APIs.""" import itertools -from typing import Dict from ansys.fluent.core.field_data_interfaces import ( PathlinesFieldDataRequest, @@ -69,18 +68,26 @@ def fetch_data(self, *args, **kwargs): Returns ------- - Dict[int: Dict[str: np.array]] + Dict[int: Dict[str: np.ndarray]] Return dictionary of surfaces id to field name to numpy array. """ - if self._post_object.__class__.__name__ == "Mesh": + from ansys.fluent.visualization.containers import ( + Contour, + Mesh, + Pathline, + Surface, + Vector, + ) + + if isinstance(self._post_object, Mesh): return self._fetch_mesh_data(self._post_object, *args, **kwargs) - elif self._post_object.__class__.__name__ == "Surface": + elif isinstance(self._post_object, Surface): return self._fetch_surface_data(self._post_object, *args, **kwargs) - elif self._post_object.__class__.__name__ == "Contour": + elif isinstance(self._post_object, Contour): return self._fetch_contour_data(self._post_object, *args, **kwargs) - elif self._post_object.__class__.__name__ == "Vector": + elif isinstance(self._post_object, Vector): return self._fetch_vector_data(self._post_object, *args, **kwargs) - elif self._post_object.__class__.__name__ == "Pathlines": + elif isinstance(self._post_object, Pathline): return self._fetch_pathlines_data(self._post_object, *args, **kwargs) @staticmethod @@ -267,7 +274,7 @@ def __init__(self, post_object: PlotDefn): """ self._post_object: PlotDefn = post_object - def fetch_data(self) -> Dict[str, Dict[str, np.array]]: + def fetch_data(self) -> dict[str, dict[str, np.ndarray]] | None: """Fetch data for visualization object. Parameters @@ -276,11 +283,12 @@ def fetch_data(self) -> Dict[str, Dict[str, np.array]]: Returns ------- - Dict[str: Dict[str: np.array]] + Dict[str: Dict[str: np.ndarray]] Return dictionary of surfaces name to numpy array of x and y values. """ + from ansys.fluent.visualization.containers import XYPlot - if self._post_object.__class__.__name__ == "XYPlot": + if isinstance(self._post_object, XYPlot): return self._fetch_xy_data(self._post_object) def _fetch_xy_data(self, obj): diff --git a/src/ansys/fluent/visualization/registrar.py b/src/ansys/fluent/visualization/registrar.py index a96b0b36..55d4b8ff 100644 --- a/src/ansys/fluent/visualization/registrar.py +++ b/src/ansys/fluent/visualization/registrar.py @@ -32,11 +32,11 @@ _renderer = {"matplotlib": MatplotlibPlotter, "pyvista": PyVistaPlotter} -def register_renderer(name, renderer): +def register_renderer(name: str, renderer: type) -> None: """Register a plotter or graphics renderer.""" _renderer[name] = renderer -def get_renderer(key: str): +def get_renderer(key: str) -> type: """Get a registered plotter or graphics renderer by name.""" return _renderer[key] diff --git a/src/ansys/fluent/visualization/renderer.py b/src/ansys/fluent/visualization/renderer.py index 27d642c9..7852011f 100644 --- a/src/ansys/fluent/visualization/renderer.py +++ b/src/ansys/fluent/visualization/renderer.py @@ -21,13 +21,24 @@ # SOFTWARE. """A wrapper to improve the user interface of graphics.""" -import warnings + +from collections.abc import Iterable +from typing import Any, Literal from ansys.fluent.interface.post_objects.post_object_definitions import ( GraphicsDefn, PlotDefn, + XYPlotDefn, ) import ansys.fluent.visualization as pyviz +from ansys.fluent.visualization.containers import ( + Contour, + Mesh, + Monitor, + Pathline, + Surface, + Vector, +) from ansys.fluent.visualization.graphics import graphics_windows_manager from ansys.fluent.visualization.graphics.graphics_windows import _GraphicsWindow from ansys.fluent.visualization.plotter.plotter_windows import _PlotterWindow @@ -58,7 +69,7 @@ class GraphicsWindow: >>> graphics_window.show() """ - def __init__(self, renderer=None): + def __init__(self, renderer: Literal["pyvista", "matplotlib"] | str | None = None): """__init__ method of GraphicsWindow class.""" self._graphics_objs = [] self.window_id = None @@ -68,10 +79,10 @@ def __init__(self, renderer=None): def add_graphics( self, - graphics_obj, - position: tuple = (0, 0), + graphics_obj: Mesh | Surface | Contour | Vector | Pathline, + position: tuple[int, int] = (0, 0), opacity: float = 1, - **kwargs, + **kwargs: Any, ) -> None: """Add graphics-data to a window. @@ -85,17 +96,16 @@ def add_graphics( Transparency of the sub-plot. """ self._list_of_positions.append(position) - if isinstance(graphics_obj._obj, GraphicsDefn): - locals()["object"] = locals().pop("graphics_obj") - self._graphics_objs.append({**locals()}) - else: - warnings.warn("Only graphics objects are supported.") + self._graphics_objs.append( + kwargs | {"object": graphics_obj, "position": position, "opacity": opacity} + ) def add_plot( self, - plot_obj, - position: tuple = (0, 0), - **kwargs, + plot_obj: Monitor | XYPlotDefn, + position: tuple[int, int] = (0, 0), + title: str | None = None, + **kwargs: Any, ) -> None: """Add 2D plot-data to a window. @@ -109,20 +119,18 @@ def add_plot( Title of the sub-plot. """ self._list_of_positions.append(position) - if isinstance(plot_obj._obj, PlotDefn): - locals()["object"] = locals().pop("plot_obj") - self._graphics_objs.append({**locals()}) - else: - warnings.warn("Only 2D plot objects are supported.") + self._graphics_objs.append( + kwargs | {"object": plot_obj, "position": position, "title": title} + ) - def _all_plt_objs(self): + def _all_plt_objs(self) -> bool: for obj in self._graphics_objs: if not isinstance(obj["object"]._obj, PlotDefn): return False return True @staticmethod - def _show_find_grid_size(points): + def _show_find_grid_size(points: Iterable[tuple[int, int]]) -> tuple[int, int]: # Extract x and y coordinates separately x_coords = {p[0] for p in points} y_coords = {p[1] for p in points} diff --git a/src/ansys/fluent/visualization/visualization_windows_manager.py b/src/ansys/fluent/visualization/visualization_windows_manager.py index ffcd7551..5a223f12 100644 --- a/src/ansys/fluent/visualization/visualization_windows_manager.py +++ b/src/ansys/fluent/visualization/visualization_windows_manager.py @@ -26,7 +26,7 @@ """ from abc import ABCMeta, abstractmethod -from typing import List, Optional, Union +from collections.abc import Sequence from ansys.fluent.interface.post_objects.post_object_definitions import ( GraphicsDefn, @@ -47,7 +47,7 @@ class VisualizationWindowsManager(metaclass=ABCMeta): """Abstract class for visualization windows management.""" @abstractmethod - def open_window(self, window_id: Optional[str] = None) -> str: + def open_window(self, window_id: str | None = None) -> str: """Open new window. Parameters @@ -64,7 +64,7 @@ def open_window(self, window_id: Optional[str] = None) -> str: @abstractmethod def set_object_for_window( - self, object: Union[GraphicsDefn, PlotDefn], window_id: str + self, object: GraphicsDefn | PlotDefn, window_id: str ) -> None: """Associate visualization object with running window instance. @@ -86,8 +86,8 @@ def set_object_for_window( @abstractmethod def plot( self, - object: Union[GraphicsDefn, PlotDefn], - window_id: Optional[str] = None, + object: GraphicsDefn | PlotDefn, + window_id: str | None = None, ) -> None: """Draw plot. @@ -131,9 +131,9 @@ def save_graphic( @abstractmethod def refresh_windows( self, - session_id: Optional[str] = "", - windows_id: Optional[List[str]] = [], - overlay: Optional[bool] = False, + session_id: str | None = "", + windows_id: list[str] | None = [], + overlay: bool | None = False, ) -> None: """Refresh windows. @@ -156,8 +156,8 @@ def refresh_windows( @abstractmethod def animate_windows( self, - session_id: Optional[str] = "", - windows_id: Optional[List[str]] = [], + session_id: str | None = "", + windows_id: Sequence[str] | None = [], ) -> None: """Animate windows. @@ -182,8 +182,8 @@ def animate_windows( @abstractmethod def close_windows( self, - session_id: Optional[str] = "", - windows_id: Optional[List[str]] = [], + session_id: str | None = "", + windows_id: Sequence[str] | None = [], ) -> None: """Close windows. diff --git a/tests/test_post.py b/tests/test_post.py index 663f3be7..d85e2962 100644 --- a/tests/test_post.py +++ b/tests/test_post.py @@ -23,7 +23,6 @@ from pathlib import Path import pickle import sys -from typing import Dict, List, Optional, Union from ansys.fluent.core.field_data_interfaces import SurfaceDataType import numpy as np @@ -47,7 +46,7 @@ def __init__(self, session_data, field_request): def add_surfaces_request( self, - surface_ids: List[int], + surface_ids: list[int], overset_mesh: bool = False, provide_vertices=True, provide_faces=True, @@ -67,10 +66,10 @@ def add_surfaces_request( def add_scalar_fields_request( self, - surface_ids: List[int], + surface_ids: list[int], field_name: str, - node_value: Optional[bool] = True, - boundary_value: Optional[bool] = False, + node_value: bool | None = True, + boundary_value: bool | None = False, ) -> None: self.fields_request["scalar"].append( (surface_ids, field_name, node_value, boundary_value) @@ -78,12 +77,12 @@ def add_scalar_fields_request( def add_vector_fields_request( self, - surface_ids: List[int], + surface_ids: list[int], field_name: str, ) -> None: self.fields_request["vector"].append((surface_ids, field_name)) - def get_fields(self) -> Dict[int, Dict]: + def get_fields(self) -> dict[int, dict]: fields = {} for request_type, requests in self.fields_request.items(): for request in requests: @@ -119,9 +118,9 @@ def new_transaction(self): def get_surface_data( self, surface_name: str, - data_type: Union[SurfaceDataType, int], - overset_mesh: Optional[bool] = False, - ) -> Dict: + data_type: SurfaceDataType | int, + overset_mesh: bool | None = False, + ) -> dict: surfaces_info = self.surfaces() surface_ids = surfaces_info[surface_name]["surface_id"] self._request_to_serve["surf"].append(