Skip to content

Commit 5b06bc0

Browse files
authored
clean up remaining TODOs (#9178)
1 parent e7f2d5e commit 5b06bc0

3 files changed

Lines changed: 3 additions & 27 deletions

File tree

tools/pylint-extensions/azure-pylint-guidelines-checker/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,7 @@ In the case of a false positive, use the disable command to remove the pylint er
9696
| do-not-log-raised-errors | Do not log errors at `error` or `warning` level when error is raised in an exception block. | pylint:disable=do-not-log-raised-errors | No Link. |
9797
| do-not-use-legacy-typing | Do not use legacy (<Python 3.8) type hinting comments | pylint:disable=do-not-use-legacy-typing | No Link. |
9898
| do-not-import-asyncio | Do not import asyncio directly. | pylint:disable=do-not-import-asyncio | No Link. |
99-
| invalid-use-of-overload | Do not mix async and synchronous overloads | pylint:disable=invalid-use-of-overload | No Link. | | Add a check for connection_verify hardcoded settings #35355 | | |
99+
| invalid-use-of-overload | Do not mix async and synchronous overloads | pylint:disable=invalid-use-of-overload | No Link. |
100100
| do-not-hardcode-connection-verify | Do not hardcode a boolean value to connection_verify | pylint:disable=do-not-hardcode-connection-verify | No LInk. |
101-
| TODO | custom linter check for invalid use of @overload #3229 | | |
102101
| do-not-log-exceptions | Do not log exceptions in levels other than debug, otherwise it can reveal sensitive information | pylint:disable=do-not-log-exceptions | [link](https://azure.github.io/azure-sdk/python_implementation.html#python-logging-sensitive-info) |
103-
| unapproved-client-method-name-prefix | Clients should use preferred verbs for method names | pylint:disable=unapproved-client-method-name-prefix | [link](https://azure.github.io/azure-sdk/python_design.html#naming) |
104-
| TODO | Address Commented out Pylint Custom Plugin Checkers #3228 | | |
102+
| unapproved-client-method-name-prefix | Clients should use preferred verbs for method names | pylint:disable=unapproved-client-method-name-prefix | [link](https://azure.github.io/azure-sdk/python_design.html#naming) |

tools/pylint-extensions/azure-pylint-guidelines-checker/pylint_guidelines_checker.py

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2817,12 +2817,6 @@ def visit_import(self, node):
28172817
)
28182818
except:
28192819
pass
2820-
# [Pylint] custom linter check for invalid use of @overload #3229
2821-
# [Pylint] Custom Linter check for Exception Logging #3227
2822-
# [Pylint] Address Commented out Pylint Custom Plugin Checkers #3228
2823-
# [Pylint] Add a check for connection_verify hardcoded settings #35355
2824-
# [Pylint] Refactor test suite for custom pylint checkers to use files instead of docstrings #3233
2825-
# [Pylint] Investigate pylint rule around missing dependency #3231
28262820

28272821

28282822
class DoNotUseLegacyTyping(BaseChecker):
@@ -2886,6 +2880,7 @@ def visit_import(self, node):
28862880

28872881

28882882
class InvalidUseOfOverload(BaseChecker):
2883+
28892884
"""Rule to check that use of the @overload decorator matches the async/sync nature of the underlying function"""
28902885

28912886
name = "invalid-use-of-overload"
@@ -3014,9 +3009,6 @@ def check_for_logging(self, node, exception_name):
30143009
self.check_for_logging(j.orelse, exception_name)
30153010

30163011

3017-
# [Pylint] Address Commented out Pylint Custom Plugin Checkers #3228
3018-
3019-
30203012
class DoNotHardcodeConnectionVerify(BaseChecker):
30213013

30223014
"""Rule to check that developers do not hardcode a boolean to connection_verify."""
@@ -3088,10 +3080,6 @@ def visit_annassign(self, node):
30883080
pass
30893081

30903082

3091-
3092-
# [Pylint] Investigate pylint rule around missing dependency #3231
3093-
3094-
30953083
# if a linter is registered in this function then it will be checked with pylint
30963084
def register(linter):
30973085
linter.register_checker(ClientsDoNotUseStaticMethods(linter))
@@ -3130,9 +3118,7 @@ def register(linter):
31303118
linter.register_checker(InvalidUseOfOverload(linter))
31313119
linter.register_checker(DoNotLogExceptions(linter))
31323120

3133-
# [Pylint] Address Commented out Pylint Custom Plugin Checkers #3228
31343121
linter.register_checker(DoNotHardcodeConnectionVerify(linter))
3135-
# [Pylint] Investigate pylint rule around missing dependency #3231
31363122

31373123
# disabled by default, use pylint --enable=check-docstrings if you want to use it
31383124
linter.register_checker(CheckDocstringParameters(linter))

tools/pylint-extensions/azure-pylint-guidelines-checker/tests/test_pylint_custom_plugins.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3767,9 +3767,6 @@ def test_guidelines_link_active(self):
37673767
assert response.http_response.status_code == 200
37683768

37693769

3770-
# [Pylint] Address Commented out Pylint Custom Plugin Checkers #3228
3771-
3772-
37733770
class TestDoNotHardcodeConnectionVerify(pylint.testutils.CheckerTestCase):
37743771
"""Test that we are not hard-coding a True or False to connection_verify"""
37753772

@@ -3904,8 +3901,3 @@ def test_invalid_connection_verify(self):
39043901
self.checker.visit_annassign(annotated_assignment)
39053902
self.checker.visit_annassign(annotated_self_assignment)
39063903

3907-
3908-
3909-
# [Pylint] Refactor test suite for custom pylint checkers to use files instead of docstrings #3233
3910-
# [Pylint] Investigate pylint rule around missing dependency #3231
3911-

0 commit comments

Comments
 (0)