Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clean up remaining TODOs #9178

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,7 @@ In the case of a false positive, use the disable command to remove the pylint er
| 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. |
| do-not-use-legacy-typing | Do not use legacy (<Python 3.8) type hinting comments | pylint:disable=do-not-use-legacy-typing | No Link. |
| do-not-import-asyncio | Do not import asyncio directly. | pylint:disable=do-not-import-asyncio | No Link. |
| 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 | | |
| invalid-use-of-overload | Do not mix async and synchronous overloads | pylint:disable=invalid-use-of-overload | No Link. |
| do-not-hardcode-connection-verify | Do not hardcode a boolean value to connection_verify | pylint:disable=do-not-hardcode-connection-verify | No LInk. |
| TODO | custom linter check for invalid use of @overload #3229 | | |
| 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) |
| 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) |
| TODO | Address Commented out Pylint Custom Plugin Checkers #3228 | | |
| 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) |
Original file line number Diff line number Diff line change
Expand Up @@ -2817,12 +2817,6 @@ def visit_import(self, node):
)
except:
pass
# [Pylint] custom linter check for invalid use of @overload #3229
# [Pylint] Custom Linter check for Exception Logging #3227
# [Pylint] Address Commented out Pylint Custom Plugin Checkers #3228
# [Pylint] Add a check for connection_verify hardcoded settings #35355
# [Pylint] Refactor test suite for custom pylint checkers to use files instead of docstrings #3233
# [Pylint] Investigate pylint rule around missing dependency #3231


class DoNotUseLegacyTyping(BaseChecker):
Expand Down Expand Up @@ -2886,6 +2880,7 @@ def visit_import(self, node):


class InvalidUseOfOverload(BaseChecker):

"""Rule to check that use of the @overload decorator matches the async/sync nature of the underlying function"""

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


# [Pylint] Address Commented out Pylint Custom Plugin Checkers #3228


class DoNotHardcodeConnectionVerify(BaseChecker):

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



# [Pylint] Investigate pylint rule around missing dependency #3231


# if a linter is registered in this function then it will be checked with pylint
def register(linter):
linter.register_checker(ClientsDoNotUseStaticMethods(linter))
Expand Down Expand Up @@ -3130,9 +3118,7 @@ def register(linter):
linter.register_checker(InvalidUseOfOverload(linter))
linter.register_checker(DoNotLogExceptions(linter))

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

# disabled by default, use pylint --enable=check-docstrings if you want to use it
linter.register_checker(CheckDocstringParameters(linter))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3767,9 +3767,6 @@ def test_guidelines_link_active(self):
assert response.http_response.status_code == 200


# [Pylint] Address Commented out Pylint Custom Plugin Checkers #3228


class TestDoNotHardcodeConnectionVerify(pylint.testutils.CheckerTestCase):
"""Test that we are not hard-coding a True or False to connection_verify"""

Expand Down Expand Up @@ -3904,8 +3901,3 @@ def test_invalid_connection_verify(self):
self.checker.visit_annassign(annotated_assignment)
self.checker.visit_annassign(annotated_self_assignment)



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