Skip to content

python-ldap: add package stubs - #16103

Open
marlon-costa-dc wants to merge 3 commits into
python:mainfrom
marlon-costa-dc:python-ldap-stubs
Open

python-ldap: add package stubs#16103
marlon-costa-dc wants to merge 3 commits into
python:mainfrom
marlon-costa-dc:python-ldap-stubs

Conversation

@marlon-costa-dc

Copy link
Copy Markdown

Resumo

Adiciona stubs parciais para o pacote python-ldap, incluindo módulos públicos, metadados e a dependência tipada de pyasn1.

Validação

  • PATH="$PWD/.venv/bin:$PATH" .venv/bin/python tests/runtests.py stubs/python-ldap
  • pre-commit, estrutura, Pyright, ty e mypy concluídos com sucesso
  • stubtest não foi executado porque instala e executa código arbitrário do PyPI

@github-actions

Copy link
Copy Markdown
Contributor

Diff from mypy_primer, showing the effect of this PR on open source code:

zulip (https://github.com/zulip/zulip)
- zproject/dev_settings.py:142: error: Cannot find implementation or library stub for module named "ldap"  [import-not-found]
+ zproject/dev_settings.py:149: error: Module has no attribute "SCOPE_ONELEVEL"  [attr-defined]
+ zproject/dev_settings.py:152: error: Module has no attribute "SCOPE_ONELEVEL"  [attr-defined]
+ zproject/dev_settings.py:157: error: Module has no attribute "SCOPE_ONELEVEL"  [attr-defined]
- zproject/prod_settings_template.py:177: error: Cannot find implementation or library stub for module named "ldap"  [import-not-found]
+ zproject/prod_settings_template.py:228: error: Module has no attribute "SCOPE_SUBTREE"  [attr-defined]
- zproject/backends.py:25: error: Cannot find implementation or library stub for module named "ldap"  [import-not-found]
+ zproject/backends.py:1611: error: Module has no attribute "SCOPE_BASE"  [attr-defined]
+ zproject/backends.py:1616: error: Module has no attribute "NO_SUCH_OBJECT"  [attr-defined]
- zerver/lib/test_helpers.py:17: error: Cannot find implementation or library stub for module named "ldap"  [import-not-found]
+ zerver/lib/test_helpers.py:62: error: Name "ldap.LDAPError" is not defined  [name-defined]
+ zerver/lib/test_helpers.py:65: error: Name "ldap.INVALID_CREDENTIALS" is not defined  [name-defined]
+ zerver/lib/test_helpers.py:68: error: Name "ldap.NO_SUCH_OBJECT" is not defined  [name-defined]
+ zerver/lib/test_helpers.py:71: error: Name "ldap.ALREADY_EXISTS" is not defined  [name-defined]
- zproject/computed_settings.py:1102: error: Cannot find implementation or library stub for module named "ldap"  [import-not-found]
+ zproject/computed_settings.py:1104: error: Module has no attribute "OPT_REFERRALS"  [attr-defined]
+ zproject/computed_settings.py:1114: error: Module has no attribute "OPT_REFERRALS"  [attr-defined]
- zerver/tests/test_email_notifications.py:5: error: Cannot find implementation or library stub for module named "ldap"  [import-not-found]
+ zerver/tests/test_email_notifications.py:298: error: Module has no attribute "SCOPE_ONELEVEL"  [attr-defined]
- zerver/tests/test_auth_backends.py:19: error: Cannot find implementation or library stub for module named "ldap"  [import-not-found]
+ zerver/tests/test_auth_backends.py:7781: error: Module has no attribute "SCOPE_ONELEVEL"  [attr-defined]
+ zerver/tests/test_auth_backends.py:7904: error: Module has no attribute "SCOPE_ONELEVEL"  [attr-defined]
+ zerver/tests/test_auth_backends.py:7907: error: Module has no attribute "SCOPE_ONELEVEL"  [attr-defined]
+ zerver/tests/test_auth_backends.py:8131: error: Module has no attribute "SCOPE_ONELEVEL"  [attr-defined]
+ zerver/tests/test_auth_backends.py:8515: error: Module has no attribute "LDAPError"  [attr-defined]
+ zerver/tests/test_auth_backends.py:9778: error: Module has no attribute "SCOPE_ONELEVEL"  [attr-defined]
+ zerver/tests/test_auth_backends.py:9845: error: Module has no attribute "SCOPE_ONELEVEL"  [attr-defined]
+ zerver/tests/test_auth_backends.py:9945: error: Module has no attribute "SCOPE_ONELEVEL"  [attr-defined]
- zproject/test_extra_settings.py:3: error: Cannot find implementation or library stub for module named "ldap"  [import-not-found]
+ zproject/test_extra_settings.py:79: error: Module has no attribute "SCOPE_ONELEVEL"  [attr-defined]
+ zproject/test_extra_settings.py:83: error: Module has no attribute "SCOPE_ONELEVEL"  [attr-defined]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants