Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
0cc4549
add
l0lawrence Mar 10, 2025
ff122a4
add
l0lawrence Mar 10, 2025
10d56d7
add
l0lawrence Mar 10, 2025
424fb3a
add
l0lawrence Mar 10, 2025
14a04fb
add tests
l0lawrence Mar 10, 2025
bef9739
log
l0lawrence Mar 10, 2025
f9b123e
log it
l0lawrence Mar 10, 2025
f89afd2
update instructions
l0lawrence Mar 10, 2025
d6651b4
run with gpt 4.0
l0lawrence Mar 10, 2025
f565096
try a loop
l0lawrence Mar 10, 2025
6ff37a4
run
l0lawrence Mar 11, 2025
27c9fdd
add
l0lawrence Mar 11, 2025
0f95243
bump
l0lawrence Mar 20, 2025
9b94ce9
add
l0lawrence Mar 26, 2025
cbfc33e
del
l0lawrence Mar 26, 2025
4e45b84
this
l0lawrence Mar 26, 2025
66cfd49
add
l0lawrence Mar 26, 2025
a294bf3
add
l0lawrence Mar 26, 2025
228d7a3
wrong
l0lawrence Mar 26, 2025
7c84fa9
more tests
l0lawrence Mar 28, 2025
6f62935
update this test
l0lawrence Mar 31, 2025
ae93c04
tests
l0lawrence Apr 1, 2025
d9566ce
bump
l0lawrence Apr 1, 2025
2ffce40
this
l0lawrence Apr 1, 2025
33792d5
protected access
l0lawrence Apr 1, 2025
7cc30d7
bump
l0lawrence Apr 1, 2025
0e82db1
bump
l0lawrence Apr 10, 2025
12d86f8
evaluation
l0lawrence Apr 10, 2025
1eff6e6
updates
l0lawrence Apr 10, 2025
2691141
update
l0lawrence Apr 11, 2025
539aa7a
this
l0lawrence Apr 11, 2025
3fbc984
t
l0lawrence Apr 11, 2025
1418a32
remove
l0lawrence Apr 11, 2025
860544d
readme
l0lawrence Apr 11, 2025
63cd335
this
l0lawrence Apr 11, 2025
eccfba0
readme
l0lawrence Apr 11, 2025
39f3312
update setup
l0lawrence Apr 11, 2025
a053056
this
l0lawrence Apr 11, 2025
3bf6025
these changes
l0lawrence Apr 18, 2025
70851aa
update
l0lawrence Apr 18, 2025
7a60144
adherence
l0lawrence Apr 21, 2025
b45b85a
file updates
l0lawrence Apr 21, 2025
97927bb
tesf files
l0lawrence Apr 21, 2025
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
2 changes: 1 addition & 1 deletion eng/pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ load-plugins=pylint_guidelines_checker
# Let's black deal with bad-continuation

# Added disables from super-with-arguments
disable=useless-object-inheritance,missing-docstring,locally-disabled,fixme,cyclic-import,too-many-arguments,invalid-name,duplicate-code,too-few-public-methods,consider-using-f-string,super-with-arguments,redefined-builtin,import-outside-toplevel,client-suffix-needed,unnecessary-dunder-call,unnecessary-ellipsis,client-paging-methods-use-list,consider-using-max-builtin,too-many-lines,possibly-used-before-assignment,do-not-hardcode-dedent, do-not-log-raised-errors, do-not-log-exceptions
disable=useless-object-inheritance,missing-docstring,locally-disabled,fixme,cyclic-import,too-many-arguments,invalid-name,duplicate-code,too-few-public-methods,consider-using-f-string,super-with-arguments,redefined-builtin,import-outside-toplevel,client-suffix-needed,unnecessary-dunder-call,unnecessary-ellipsis,client-paging-methods-use-list,consider-using-max-builtin,too-many-lines,possibly-used-before-assignment,do-not-hardcode-dedent,


[FORMAT]
Expand Down
4 changes: 2 additions & 2 deletions eng/tox/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ commands =

[testenv:next-pylint]
description=Lints a package with pylint (version {[testenv:next-pylint]pylint_version})
pylint_version=3.2.7
pylint_version=3.3.6
skipsdist = true
skip_install = true
usedevelop = false
Expand All @@ -117,7 +117,7 @@ deps =
PyGitHub>=1.59.0
commands =
python -m pip install pylint=={[testenv:next-pylint]pylint_version}
python -m pip install azure-pylint-guidelines-checker==0.5.4 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/"
python -m pip install {repository_root}/../azure-sdk-tools/tools/pylint-extensions/azure-pylint-guidelines-checker
python {repository_root}/eng/tox/create_package_and_install.py \
-d {envtmpdir}/dist \
-p {tox_root} \
Expand Down
65 changes: 65 additions & 0 deletions tools/azure-sdk-tools/linting_tools/lint_test_bench/.pylintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
[MASTER]
reports=no
init-hook='import sys; sys.path.append(".");'

# PYLINT DIRECTORY BLACKLIST.
ignore-paths=
azure\\mixedreality\\remoterendering\\_api_version.py,
azure/mixedreality/remoterendering/_api_version.py,
(?:.*[/\\]|^)projects/(models/_models.py|_model_base.py|operations/_operations.py|aio/operations/_operations.py)$,
# Exclude any path that contains the following directory names
(?:.*[/\\]|^)(?:_vendor|_generated|_restclient|samples|examples|test|tests|doc|\.tox)(?:[/\\]|$)

load-plugins=pylint_guidelines_checker

[MESSAGES CONTROL]
# For all codes, run 'pylint --list-msgs' or go to 'https://pylint.pycqa.org/en/latest/technical_reference/features.html'
# locally-disabled: Warning locally suppressed using disable-msg
# cyclic-import: because of https://github.com/PyCQA/pylint/issues/850
# too-many-arguments: Due to the nature of the CLI many commands have large arguments set which reflect in large arguments set in corresponding methods.
# Let's black deal with bad-continuation

# Added disables from super-with-arguments
disable=useless-object-inheritance,missing-docstring,locally-disabled,fixme,cyclic-import,too-many-arguments,invalid-name,duplicate-code,too-few-public-methods,consider-using-f-string,super-with-arguments,redefined-builtin,import-outside-toplevel,client-suffix-needed,unnecessary-dunder-call,unnecessary-ellipsis,client-paging-methods-use-list,consider-using-max-builtin,too-many-lines,possibly-used-before-assignment, protected-access


[FORMAT]
max-line-length=120

[VARIABLES]
# Tells whether we should check for unused import in __init__ files.
init-import=yes

[DESIGN]
# Maximum number of locals for function / method body
max-locals=25
# Maximum number of branch for function / method body
max-branches=20
# Maximum number of instance attributes for class
max-attributes=10
# Maximum number of ancestors
max-parents=15

[SIMILARITIES]
min-similarity-lines=10

[BASIC]
# Naming hints based on PEP 8 (https://www.python.org/dev/peps/pep-0008/#naming-conventions).
# Consider these guidelines and not hard rules. Read PEP 8 for more details.

# The invalid-name checker must be **enabled** for these hints to be used.
include-naming-hint=yes

module-naming-style=snake_case
const-naming-style=UPPER_CASE
class-naming-style=PascalCase
class-attribute-naming-style=snake_case
attr-naming-style=snake_case
method-naming-style=snake_case
function-naming-style=snake_case
argument-naming-style=snake_case
variable-naming-style=snake_case
inlinevar-naming-style=snake_case

[TYPECHECK]
generated-members=js.*
27 changes: 27 additions & 0 deletions tools/azure-sdk-tools/linting_tools/lint_test_bench/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# README

## Initial Setup


Install the required packages using pip:

```bash
pip install -r requirements.txt
```

## Set the following environment variables:
```bash
export AZURE_OPENAI_ENDPOINT="<your-azure-openai-endpoint>"
export AZURE_OPENAI_MODEL="<your-azure-openai-model>"
export AZURE_OPENAI_VERSION="<your-azure-openai-version>"
export AZURE_OPENAI_KEY="<your-azure-openai-key>"
```


## Run the test bench
```bash
python pylint_test_bench.py
```

### Test Bench Output
The test bench will run pylint on the files in the /test_files directory. The final output will be saved under the /output-logs directory. To see the logging for a specific file, you can check the corresponding log file in the directory you are running in. The log files are named after the files they correspond to, with a .log extension. The output fixed pylint code will be saved under the /fixed_files directory. The fixed files are named after the original files, with a timestamp added to the name as they are iterated over. The output will also be printed to the console.
Loading
Loading