Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Literal types #1

Closed
wants to merge 18 commits into from
Closed

Literal types #1

wants to merge 18 commits into from

Commits on Mar 14, 2019

  1. Configuration menu
    Copy the full SHA
    c5b8a43 View commit details
    Browse the repository at this point in the history
  2. Fix external links (?)

    MichaelLeeDBX committed Mar 14, 2019
    Configuration menu
    Copy the full SHA
    0c947fb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ab90bcf View commit details
    Browse the repository at this point in the history
  4. Prune text

    MichaelLeeDBX committed Mar 14, 2019
    Configuration menu
    Copy the full SHA
    231c104 View commit details
    Browse the repository at this point in the history
  5. Fix code formatting

    MichaelLeeDBX committed Mar 14, 2019
    Configuration menu
    Copy the full SHA
    82105ba View commit details
    Browse the repository at this point in the history
  6. More wording tweaks

    MichaelLeeDBX committed Mar 14, 2019
    Configuration menu
    Copy the full SHA
    b467857 View commit details
    Browse the repository at this point in the history
  7. General cleanup, discuss negative numbers and enums, allow nested lit…

    …erals
    
    This commit:
    
    1. Performs a bunch of cleanup suggested by Ivan
    2. Adds a note clarifying that negative numbers are *allowed*
    3. Adds a note reiterating that PEP 484 expects type checkers to
       understand enum values when performing type inference (and
       suggests this can be implemented by treating enums as roughly
       equal to the union of their types)
    4. Moves "nested literals" into the "supported" category -- as I
       discovered in python/mypy#5947,
       implementing support for this is not as bad as I thought.
    5. Adds an explicit warning to the "literals and generics" section.
    6. Modifies some text to become more firm about disallowing
       'Literal[Any]' and related constructs.
    7. Deletes discussion about TypeScript's "index types" and "keyof"
       operator -- I mostly included that only because I got some feedback
       earlier to discuss TypeScript. It felt pretty shoehorned in,
       anyways.
    MichaelLeeDBX committed Mar 14, 2019
    Configuration menu
    Copy the full SHA
    12c6f44 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    554a2df View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    003afd6 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    a8b6f16 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    088f492 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    79253dd View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    fb9ada2 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    3ddaa0c View commit details
    Browse the repository at this point in the history
  15. Remove one e.g.

    MichaelLeeDBX committed Mar 14, 2019
    Configuration menu
    Copy the full SHA
    8006152 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    e6d7c15 View commit details
    Browse the repository at this point in the history
  17. Update headers

    MichaelLeeDBX committed Mar 14, 2019
    Configuration menu
    Copy the full SHA
    9d46b3c View commit details
    Browse the repository at this point in the history
  18. Apply suggestions from Jelle's code review

    Co-Authored-By: Michael0x2a <[email protected]>
    JelleZijlstra and Michael0x2a authored Mar 14, 2019
    Configuration menu
    Copy the full SHA
    32582e6 View commit details
    Browse the repository at this point in the history