From 3265baf8282729f2406774b51f550b50c3afe00a Mon Sep 17 00:00:00 2001 From: Bimochan Shrestha Date: Tue, 3 Mar 2020 22:51:30 +0545 Subject: [PATCH 1/4] pyright-config: Fix pyRight configuration so that it checks for required files and provides necessary warnings --- pyrightconfig.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pyrightconfig.json b/pyrightconfig.json index 880c3ac..a8e460a 100644 --- a/pyrightconfig.json +++ b/pyrightconfig.json @@ -1,6 +1,4 @@ { - "include": ["datamegh/**/*.py", "tests/**/*.py"], - "exclude":["venv", "*.pyc", "*.egg-info", ".coverage"], - "reportMissingImports": true, - "strict":["datamegh", "tests"] + "exclude":["venv", ".venv", "*.pyc", "*.egg-info", ".coverage", "node_modules"], + "reportMissingImports": true } From a944ef5bd9f68e2614157876140e381084f5fab7 Mon Sep 17 00:00:00 2001 From: Bimochan Shrestha Date: Tue, 3 Mar 2020 23:04:47 +0545 Subject: [PATCH 2/4] pyright-config: Add neccessary configs for pyRight --- pyrightconfig.json | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/pyrightconfig.json b/pyrightconfig.json index a8e460a..a27c5e5 100644 --- a/pyrightconfig.json +++ b/pyrightconfig.json @@ -1,4 +1,27 @@ { "exclude":["venv", ".venv", "*.pyc", "*.egg-info", ".coverage", "node_modules"], - "reportMissingImports": true + "reportMissingImports": true, + "reportUnusedVariable": true, + "reportImportCycles": true, + "reportUnusedClass": true, + "reportUnusedFunction": true, + "reportDuplicateImport": true, + "reportOptionalSubscript": true, + "reportUntypedFunctionDecorator": true, + "reportUntypedClassDecorator": true, + "reportUntypedBaseClass": true, + "reportUntypedNamedTuple": true, + "reportPrivateUsage": true, + "reportConstantRedefinition": true, + "reportInvalidStringEscapeSequence": true, + "reportUnknownParameterType": true, + "reportUnknownArgumentType": true, + "reportUnknownLambdaType": true, + "reportUnknownVariableType": true, + "reportUnknownMemberType": true, + "reportUnnecessaryIsInstance": true, + "reportUnnecessaryCast": true, + "reportAssertAlwaysTrue": "warning", + "reportImplicitStringConcatenation": true + } From 22ec1a0e41d03381bc332d2cd34c029bbd177716 Mon Sep 17 00:00:00 2001 From: Bimochan Shrestha Date: Tue, 3 Mar 2020 23:13:11 +0545 Subject: [PATCH 3/4] pyright-config: Add virtualenv paths such that packages not found errors are voided --- pyrightconfig.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyrightconfig.json b/pyrightconfig.json index a27c5e5..f4aa766 100644 --- a/pyrightconfig.json +++ b/pyrightconfig.json @@ -1,5 +1,7 @@ { "exclude":["venv", ".venv", "*.pyc", "*.egg-info", ".coverage", "node_modules"], + "venvPath": ".", + "venv": ".venv", "reportMissingImports": true, "reportUnusedVariable": true, "reportImportCycles": true, From 0395913cc76b2806bf62717c11eecb7e9064b793 Mon Sep 17 00:00:00 2001 From: Bimochan Shrestha Date: Mon, 23 Mar 2020 19:31:31 +0545 Subject: [PATCH 4/4] pyright-config: Remove unnecessary extra line --- pyrightconfig.json | 1 - 1 file changed, 1 deletion(-) diff --git a/pyrightconfig.json b/pyrightconfig.json index f4aa766..e37d257 100644 --- a/pyrightconfig.json +++ b/pyrightconfig.json @@ -25,5 +25,4 @@ "reportUnnecessaryCast": true, "reportAssertAlwaysTrue": "warning", "reportImplicitStringConcatenation": true - }