Skip to content

Use a typevar style mypy annotation on cache_with_key #1348

Closed

Description

@timabbott

Currently, our mypy checking of UserProfile objects is very limited, because cache_with_key has an ignore annotation. The cache_with_key decorator is applied to dozens of functions, many of which are called hundreds of times, so I think we can substantially increase the actual coverage of our mypy usage by fixing the cache_with_key annotation.

$ git grep get_user_profile_by | wc
    365    1464   34670

@sharmaeklavya2 FYI.

Activity

  1. timabbott commented on Oct 20, 2017

    @timabbott
    SponsorMemberAuthor

    @neiljp if you're interested in doing a bit of fancy mypy work, this would be super valuable to fix, since it'd dramatically increase the practical mypy coverage of Zulip (aka it'll get rid of a lot of things that are Any).

  2. neiljp commented on Oct 24, 2017

    @neiljp
    Contributor

    @zulipbot claim

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions