Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Alexander Ivanov
    @alehander92
    ah sorry
    Costin Petrescu
    @CosFlasher

    Hi guys,

    My name is Costin and I am a student in the third year at UCL. I am doing some improvements on Jedi, code completion for Python, as my final year project. I am messaging you because I need some help due to the reason that I believe that mypy is doing already what I need. I am trying to catch all the variables and their types from a Python source code. I have already tried to use mypy from terminal too see if I can catch them, but I wasn't successful.

    If you want to guide me, it would be help me a lot.

    Thank you,
    Costin

    Ivan Levkivskyi
    @ilevkivskyi
    Hi, the discussion moved to https://gitter.im/python/typing, see topic
    Jelle Zijlstra
    @JelleZijlstra
    is anybody else having trouble loading GitHub?
    I just tried to merge python/typeshed#1676 and got an error
    Jelle Zijlstra
    @JelleZijlstra
    never mind, it's fine now
    juan pablo romero
    @jpablo
    Hi guys, do you know how to declare the signature a function that can receive named arguments? I'm getting this error: error: Unexpected keyword argument "my_flag"
    Ivan Levkivskyi
    @ilevkivskyi
    Hi
    discussion moved to python/typing room, see topic
    juan pablo romero
    @jpablo
    Ah, true, thanks
    Chế Tiệp Chân Khoa
    @voanhcuoc
    annotate type across multiple modules lead to circular importing, how do I avoid it ?
    I just want to annotate some types and don't want to import at run time ??
    Ivan Levkivskyi
    @ilevkivskyi
    Discussion moved to https://gitter.im/python/typing, see topic
    Ivan Levkivskyi
    @ilevkivskyi
    Discussion moved, see topic.
    Kishore Karanam
    @kishorekaranam9_twitter
    Hello
    Ethan Smith
    @ethanhs
    Hi @kishorekaranam9_twitter the chat has moved to https://gitter.im/python/typing
    fyi
    datascienceforlife
    @datascienceforlife
    given a point which is the centroid, how can I project it multiple times to form a set of point in the form of a matrix around knowing it dimensions in geospatial python ?
    Drew Boardman
    @drewboardman
    Hey I'm trying to get the prime factors of a large number - and I'm getting the following error
        set(reduce(list.__add__, ([i, n // i] for i in xrange(1, int(pow(n, 0.5) + 1)) if n % i == 0)))
    OverflowError: Python int too large to convert to C long
    any ideas? I tried changing int to long
    same exception
    Ethan Smith
    @ethanhs
    @drewboardman This channel has moved, and is not for general Python discussion please look at https://www.python.org/about/help for resources
    Ben Scherrey
    @scherrey
    I want to check all the python source files in my current directory and every child subdirectory (especially so it will catch my unit tests which exercise the code). I'm new at this mypy thing but I've found this exceedingly difficult to figure out how to do. What am I missing?
    Ethan Smith
    @ethanhs
    The chat has moved to https://gitter.im/python/typing
    ilmucio
    @ilmucio
    error: Argument 1 to "len" has incompatible type "Optional[str]"; expected "Sized" ... This issue seam suggest a fix python/mypy#3187 but in this case the class is a string
    Jelle Zijlstra
    @JelleZijlstra
    discussion has moved to the typing channel (see Ethan's message above), but your issue is the Optional; that means the value can be None, and None doesn't support len()
    Alexander Kreuzer
    @akreuzer
    Hi all! I am using mypy 0.610 together with dataclasses. When I try to instantiate the dataclass I alway get an error of the following type. Unexpected keyword argument “field" for “Dataclass” or error:Too many arguments for “Dataclass”. Am I doing somthing or is this not yet supported with mypy?
    Alexander Kreuzer
    @akreuzer

    To add a minimal example

    from dataclasses import dataclass
    @dataclass
    class Dataclass:
        id: int
        name: str
    
    Dataclass(0, "Foo Corp.")
    Dataclass(id=0, name="Bar Corp.”)

    Yields

    test.py:1: error: Cannot find module named 'dataclasses'
    test.py:1: note: (Perhaps setting MYPYPATH or using the "--ignore-missing-imports" flag would help)
    test.py:10: error: Too many arguments for "Dataclass"
    test.py:12: error: Unexpected keyword argument "id" for "Dataclass"
    /Users/alex/.python_envs/test/lib/mypy/typeshed/stdlib/3/builtins.pyi:38: note: "Dataclass" defined here
    test.py:12: error: Unexpected keyword argument "name" for "Dataclass"
    /Users/alex/.python_envs/test/lib/mypy/typeshed/stdlib/3/builtins.pyi:38: note: "Dataclass" defined here
    Ivan Levkivskyi
    @ilevkivskyi
    Please read the channel topic, this channel is no more active, discussion moved to python/typing channel.
    Samyak Jain
    @JainSamyak8840
    is python can provide secure static programming using mypy similar to Java static programming style?
    Michael
    @Maktm
    So with regards to the "error: No library stub file for module ''" error message, when does it show up?
    If I tried it with numpy then it'll show that error message
    But if I create a new module with a function in it, import that module and use it, then I don't get that error message
    So when does it say that a module doesn't have type hints? When it's installed using pip?
    Nathan Jones
    @jonesnc
    Can Generic class type annotations be added with the comment syntax?
    olivier65
    @olivier65
    I have a problem whereby mypy does absolutely nothing. The file has annotations and is found; if I turn up the verbosity I can see mypy parsing stuff and filling up the .mypy_cache but as to checking the file nada: it does nothing. What could be causing that?
    Ethan Smith
    @ethanhs
    Do you have an example file? Can you isolate it and try it with https://mypy-play.net?
    olivier65
    @olivier65
    ok, after some experimentation, it turns out the file actually had no errors!
    Ivan Levkivskyi
    @ilevkivskyi
    Please move to typing, this channel is closed.
    Azeem Haider
    @axeemhaider_twitter
    Hi, I created repo for Firestore called FireO Please check it and give some feedback
    Azeem Haider
    @axeemhaider_twitter
    Hi, I create Repo for Firestore. It's an ORM model for Firestore.
    Please check it and give some feedback FireO
    Jacek Wielemborek
    @d33tah
    Hi! I have an issue and I'm not sure if it's the target library or mypy - could someone take a quick look? alliefitter/boto3_type_annotations#13
    Ethan Smith
    @ethanhs
    Hi! Btw the room has changed to https://gitter.im/python/typing. I responded to the issue
    Jacek Wielemborek
    @d33tah
    thanks @ethanhs!
    Thomas Grainger
    @graingert
    is there a way to get mypy to check untyped defs with associated .pyi files?
    Ethan Smith
    @ethanhs
    @graingert the chat moved to https://gitter.im/python/typing !
    Thomas Grainger
    @graingert
    oh dang
    I know that too
    Ethan Smith
    @ethanhs
    happens :P