diff --git a/.chronus/changes/updatepylintrc-2026-6-20-11-16-52.md b/.chronus/changes/updatepylintrc-2026-6-20-11-16-52.md new file mode 100644 index 0000000000..8860e38129 --- /dev/null +++ b/.chronus/changes/updatepylintrc-2026-6-20-11-16-52.md @@ -0,0 +1,7 @@ +--- +changeKind: internal +packages: + - "@azure-tools/typespec-python" +--- + +Disable no-cross-package-private-import pylint check \ No newline at end of file diff --git a/packages/typespec-python/eng/scripts/ci/config/pylintrc b/packages/typespec-python/eng/scripts/ci/config/pylintrc index 387021335f..606db7dc19 100644 --- a/packages/typespec-python/eng/scripts/ci/config/pylintrc +++ b/packages/typespec-python/eng/scripts/ci/config/pylintrc @@ -16,8 +16,12 @@ enable=useless-suppression # 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. # too-many-lines: Due to code generation many files end up with too many lines. +# no-cross-package-private-import: The guideline checker does not resolve relative +# imports (it ignores the import level), so legitimate same-package relative imports +# like `from ...operations._operations import ...` in generated async code are +# misreported as cross-package private imports. # Let's black deal with bad-continuation -disable=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,disallowed-name,consider-using-max-builtin,unknown-option-value,file-needs-copyright-header,too-many-positional-arguments +disable=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,disallowed-name,consider-using-max-builtin,unknown-option-value,file-needs-copyright-header,too-many-positional-arguments,no-cross-package-private-import [FORMAT] max-line-length=120