-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* dedent rule * update * readme * copilot * update * register
- Loading branch information
1 parent
1a44261
commit 5144d2e
Showing
4 changed files
with
193 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
tools/pylint-extensions/azure-pylint-guidelines-checker/tests/test_files/dedent_failure.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# test_ignores_correct_dedent_in_function | ||
def function_foo(x, y, z): | ||
"""docstring | ||
.. admonition:: Example: | ||
.. literalinclude:: ../samples/sample_authentication.py | ||
:start-after: [START auth_from_connection_string] | ||
:end-before: [END auth_from_connection_string] | ||
:language: python | ||
:dedent: | ||
:caption: Authenticate with a connection string | ||
""" | ||
pass | ||
|
||
|
||
# test_failure_dedent_in_function | ||
def function_foo1(x, y, z): | ||
"""docstring | ||
.. admonition:: Example: | ||
This is Example content. | ||
Should support multi-line. | ||
Can also include file: | ||
.. literalinclude:: ../samples/sample_authentication.py | ||
:start-after: [START auth_from_connection_string] | ||
:end-before: [END auth_from_connection_string] | ||
:language: python | ||
:dedent: 8 | ||
""" | ||
|
||
|
||
# test_ignores_correct_dedent_in_class | ||
class SomeClient(object): | ||
"""docstring | ||
.. admonition:: Example: | ||
.. literalinclude:: ../samples/sample_authentication.py | ||
:start-after: [START auth_from_connection_string] | ||
:end-before: [END auth_from_connection_string] | ||
:language: python | ||
:dedent: | ||
:caption: Authenticate with a connection string | ||
""" | ||
|
||
def __init__(self): | ||
pass | ||
|
||
|
||
# test_failure_dedent_in_class | ||
class Some1Client(): # @ | ||
"""docstring | ||
.. admonition:: Example: | ||
This is Example content. | ||
Should support multi-line. | ||
Can also include file: | ||
.. literalinclude:: ../samples/sample_authentication.py | ||
:start-after: [START auth_from_connection_string] | ||
:end-before: [END auth_from_connection_string] | ||
:language: python | ||
:dedent: 8 | ||
""" | ||
|
||
def __init__(self): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters