Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Worse developer experience since introducing async support - IntelliSense doesn't work for endpoint classes #483

Closed
@michaeloliverx

Description

@michaeloliverx

Some background first:
I used this SDK in a previous company with a very positive experience, fast forward a few years I find myself working with auth0 in python again only to find that the DX is much worse :(

Describe the problem

It looks like since the introduction of asyncio support that the attributes are dynamically added:

def __init__(self, domain, token, rest_options=None):
for name, cls in modules.items():
setattr(
self,
name,
cls(domain=domain, token=token, rest_options=rest_options),
)

This doesn't play well with static analysis thus there is no autocomplete / intellisense for any of the endpoint classes.

image

image

This also means that type checking via mypy / pyright etc doesn't work.

What was the expected behavior?

I expect all the endpoint classes to be listed as attributes.

This was the behaviour of v3.22.0:
image

Reproduction

from auth0.management import Auth0

auth0_client = Auth0("", "")

auth0_client.users

Environment

  • Version of this library used: 4.1.0
  • Which framework are you using, if applicable:
  • Other modules/plugins/libraries that might be involved:
  • Any other relevant information you think would be useful:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions