├── .github └── workflows │ └── dummy.yml ├── .gitignore ├── LICENSE ├── README.md ├── about.html ├── build.py ├── contact.html ├── demo ├── bank-s.py ├── bank.py ├── complex-s.py ├── complex.py ├── nlargest.py ├── primes-s.py ├── primes.py ├── sieve2-s.py ├── sieve2.py ├── wordfreq-orig.py ├── wordfreq-s.py └── wordfreq.py ├── examples.html ├── faq.html ├── favicon.ico ├── index.html ├── index.md ├── learn.html ├── news.html ├── news.yaml ├── out └── .gitignore ├── overview.html ├── requirements.txt ├── roadmap.html ├── scripts └── copy-to-server.sh ├── site.scss ├── static ├── mypy_badge.svg └── mypy_light.svg ├── template.html └── tutorial.html /.github/workflows/dummy.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: CI 4 | 5 | # Controls when the workflow will run 6 | on: 7 | # Triggers the workflow on push or pull request events but only for the master branch 8 | push: 9 | branches: [ master ] 10 | pull_request: 11 | branches: [ master ] 12 | 13 | # Allows you to run this workflow manually from the Actions tab 14 | workflow_dispatch: 15 | 16 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 17 | jobs: 18 | # This workflow contains a single job called "build" 19 | build: 20 | # The type of runner that the job will run on 21 | runs-on: ubuntu-latest 22 | 23 | # Steps represent a sequence of tasks that will be executed as part of the job 24 | steps: 25 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 26 | - uses: actions/checkout@v2 27 | 28 | # Runs a single command using the runners shell 29 | - name: Run a one-line script 30 | run: echo Hello, world! 31 | 32 | # Runs a set of commands using the runners shell 33 | - name: Run a multi-line script 34 | run: | 35 | echo Add other actions to build, 36 | echo test, and deploy your project. 37 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .sass-cache 2 | site.css 3 | site.css.map 4 | venv/ 5 | *~ 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | http://creativecommons.org/licenses/by-sa/3.0/ -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # mypy-website 2 | 3 | ## Dependencies: 4 | 5 | ``` 6 | python3 -m pip install -r requirements.txt 7 | ``` 8 | 9 | ## To update news items 10 | 11 | Edit `news.yaml` and add an entry to the new news item at the top. 12 | 13 | ## To build locally: 14 | ``` 15 | python3 build.py 16 | ``` 17 | Output is in `out`. 18 | 19 | ## To build and update the website: 20 | ``` 21 | scripts/copy-to-server.sh 22 | ``` 23 | This runs build.py and then copies everything from `out` to `mypy-lang.org`. 24 | -------------------------------------------------------------------------------- /about.html: -------------------------------------------------------------------------------- 1 | $title mypy - About$ 2 | $keywords about mypy, mypy information$ 3 | $description Information about mypy: background, history and development team.$ 4 | 5 |
In addition to Python and Alore, the design of mypy has been 20 | influenced by Java, C#, Typed 21 | Racket, Boo, Dart and the work of Jeremy G. Siek and Walid Taha on gradual 22 | typing. 23 | 24 |
Jukka is the lead developer of mypy. Born and raised in Finland, 29 | Jukka works as a software engineer at Dropbox. Jukka created mypy 30 | while he was at the 31 | University of Cambridge Computer 32 | Laboratory in the UK as a PhD student. Before Cambridge, Jukka worked as 33 | a software engineer and later as a development manager for 9 years. 34 | 35 |
Jukka lives with his wife, two children, a cat, and a dog in Cambridge, England. 36 | 37 |
Guido is Python's BDFL. Born and raised 40 | in the Netherlands, Guido works as a software engineer at Dropbox in San Francisco. 41 | 42 |
Ivan is an engineer working on mypy since 2016. Born and raised in Ukraine, 45 | spent 10 years in Switzerland working as a physicist, Ivan now works as a software 46 | engineer at Dropbox Ireland. 47 | 48 |
Michael is an engineer at Dropbox in San Francisco. Born and raised 51 | in Wisconsin, Michael joined the mypy team after completing a PhD at 52 | Carnegie Mellon University's 53 | Principles of Programming Group. 54 | 55 |
The following people have contributed to mypy as Dropbox employees, 58 | interns or contractors.
59 | 60 |The following non-Dropboxers are considered core mypy contributors.
72 | 73 |See the 82 | CREDITS file 83 | in the repository for a list of contributors.
84 | 85 |Send us a pull request 86 | to join the team!
87 | 88 |The development of mypy and the research behind mypy has been 93 | supported financially 94 | by the Finnish Cultural Foundation, 95 | the Academy of Finland, 96 | Emil Aaltonen Foundation, 97 | Engineering and Physical Sciences Research 98 | Council UK, University of Cambridge 99 | Computer Laboratory, ACM, 100 | and Dropbox. 101 | -------------------------------------------------------------------------------- /build.py: -------------------------------------------------------------------------------- 1 | """Build mypy website (html and css). 2 | 3 | Needs libsass (pip install libsass). 4 | 5 | NOTES: 6 | 7 | This is pretty crufty and was originally translated from an old script 8 | written in Alore. Much of this doesn't make sense any more. 9 | """ 10 | 11 | import shutil 12 | from re import sub, DOTALL, match, search 13 | import re 14 | import subprocess 15 | from textwrap import dedent 16 | 17 | from yaml import load, dump 18 | try: 19 | from yaml import CLoader as Loader, CDumper as Dumper 20 | except ImportError: 21 | from yaml import Loader, Dumper 22 | 23 | news_items = load(open('news.yaml'), Loader=Loader)['items'] 24 | 25 | pages = ['index', 'examples', 'tutorial', 'about', 'news', 'faq', 'contact', 26 | 'roadmap', 'news', 27 | 28 | 'overview' # legacy 29 | ] 30 | files = ['site.css', 'favicon.ico'] 31 | static_dirs = ['static'] 32 | 33 | out_dir = 'out' 34 | 35 | default_title = 'mypy' 36 | default_keywords = 'mypy, python static typing, python optional typing' 37 | default_description = 'Mypy is an experimental Python variant with seamless dynamic and static typing.' 38 | 39 | KW = ['class', 'for', 'in', 'return', 'if', 'else', 'void', 'pass', 40 | 'def', 'any', 'member', 'while', 'static', 'import', 'raise', 'not', 41 | 'yield', 'break', 'interface', 'from', 'with', 'as'] 42 | 43 | def build_page(p): 44 | t = open('template.html').read() 45 | content = open('%s.html' % p).read() 46 | content, meta = format_content(content) 47 | t = t.replace('$content$', content) 48 | t = t.replace('$title$', meta.get('title', default_title)) 49 | t = t.replace('$keywords$', meta.get('keywords', default_keywords)) 50 | t = t.replace('$description$', meta.get('description', 51 | default_description)) 52 | if '$contents' in t: 53 | t = t.replace('$contents$', build_contents(t)) 54 | if '$latestnews$' in t: 55 | t = t.replace('$latestnews$', build_latest_news()) 56 | if '$news$' in t: 57 | t = t.replace('$news$', build_news()) 58 | f = open('%s/%s.html' % (out_dir, p), 'w') 59 | f.write(t) 60 | f.close() 61 | 62 | 63 | def format_content(s): 64 | meta = {} 65 | 66 | s = sub(r'\$code!([^!]*)!', lambda m: render_code(m.group(1)), 67 | s, flags=DOTALL) 68 | s = sub(r'\$email\(([^)]*)\)\$', lambda m: obfuscate_email(m.group(1)), s) 69 | s = sub(r'\$include\(([^)]*)\)\$', lambda m: include(m.group(1)), s) 70 | s = sub(r'\$example\(([^)]*)\)\$', lambda m: example(m.group(1)), s) 71 | 72 | for tag in 'title', 'keywords', 'description': 73 | m = search(r'\$%s ([^$]*)\$' % tag, s) 74 | if m: 75 | meta[tag] = m.group(1) 76 | s = s.replace(m.group(), '') 77 | 78 | return s, meta 79 | 80 | def render_code(s): 81 | s = s.rstrip() 82 | s = dedent(s) 83 | s = s.replace('<', '<') 84 | s = s.replace('>', '>') 85 | 86 | for kw in KW: 87 | s = sub(r'\b%s\b' % kw, r'%s' % kw, s) 88 | 89 | for kw in ('list', 'str', 'print', 'int', 'float', 'tuple', 'bool', 90 | 'bytes', 'dict', 'object', 'Dict', 'List', 'Iterator', 'Any', 91 | 'Set', 'typevar', 'Generic', 'Iterable', 'Sequence'): 92 | s = sub(r'\b%s\b' % kw, r'%s' % kw, s) 93 | 94 | s = sub(r"('[^']*')", r'\1', s) 95 | s = sub(r'(""".*""")', r'\1', s, flags=DOTALL) 96 | 97 | s = sub(r'(#.*)', r'\1', s) 98 | s = sub(r'(""".*?""")', r'\1', s) 99 | 100 | s = sub(r'\|\|(.*?)\|\|', r'\1', s) 101 | 102 | return '
%s' % s 103 | 104 | 105 | def include(fnam): 106 | return open(fnam, 'r').read() 107 | 108 | 109 | def example(fnam): 110 | f1 = render_code(open('demo/%s.py' % fnam, 'r').read()) 111 | f2 = render_code(open('demo/%s-s.py' % fnam, 'r').read()) 112 | return ''' 113 |
%s\n
%s
- %s' % (item['date'], item['text'], item['author'])) 203 | return '\n'.join(res) 204 | 205 | 206 | def build_latest_news(): 207 | res = [] 208 | for item in news_items[:4]: 209 | res.append('
%s\n' % item['title']) 210 | res.append('
%s: %s -%s' % (item['date'], item['text'], item['author'])) 211 | return '\n'.join(res) 212 | 213 | 214 | if __name__ == '__main__': 215 | main() 216 | -------------------------------------------------------------------------------- /contact.html: -------------------------------------------------------------------------------- 1 | $title mypy - Contact$ 2 | $keywords mypy contact, mypy feedback, mypy comments, mypy information$ 3 | $description Mypy contact information. Send feedback to developers to help improve mypy.$ 4 | 5 |
We want to hear from you! 14 |
Send your comments, questions, ideas, wishes, (constructive) criticism 15 | and encouragement to our GitHub tracker. 16 | We take all 17 | feedback seriously. Mypy is still in development and your feedback 18 | has a good chance of affecting how things will go. 19 | 20 | 21 | -------------------------------------------------------------------------------- /demo/bank-s.py: -------------------------------------------------------------------------------- 1 | class BankAccount: 2 | def __init__||(self, initial_balance: int = 0) -> None||: 3 | self.balance = initial_balance 4 | def deposit||(self, amount: int) -> None||: 5 | self.balance += amount 6 | def withdraw||(self, amount: int) -> None||: 7 | self.balance -= amount 8 | def overdrawn||(self) -> bool||: 9 | return self.balance < 0 10 | 11 | my_account = BankAccount(15) 12 | my_account.withdraw(5) 13 | print(my_account.balance) 14 | -------------------------------------------------------------------------------- /demo/bank.py: -------------------------------------------------------------------------------- 1 | class BankAccount: 2 | def __init__||(self, initial_balance=0)||: 3 | self.balance = initial_balance 4 | def deposit||(self, amount)||: 5 | self.balance += amount 6 | def withdraw||(self, amount)||: 7 | self.balance -= amount 8 | def overdrawn||(self)||: 9 | return self.balance < 0 10 | 11 | my_account = BankAccount(15) 12 | my_account.withdraw(5) 13 | print(my_account.balance) 14 | -------------------------------------------------------------------------------- /demo/complex-s.py: -------------------------------------------------------------------------------- 1 | class complex: 2 | """A toy partial complex number implementation. Uses method and 3 | operator overloading and multiple dispatch.""" 4 | 5 | void __init__(self, float re, float im=0): 6 | self.re = re 7 | self.im = im 8 | 9 | void __init__(self, complex n): 10 | self.__init__(n.re, n.im) 11 | 12 | str __str__(self): 13 | if self.im >= 0: 14 | return "({} + {}j)".format(self.re, self.im) 15 | else: 16 | return "({} - {}j)".format(self.re, -self.im) 17 | 18 | # Use multiple dispath for __eq__. 19 | 20 | bool __eq__(self, object n): # Default __eq__ overload 21 | return False 22 | 23 | bool __eq__(self, complex n): 24 | return self.re == c.re and self.im == c.im 25 | 26 | bool __eq__(self, float n): 27 | return self.re == n and self.im == 0 28 | 29 | int __hash__(self): 30 | if self.im: 31 | return hash((self.re, self.im)) 32 | else: 33 | return hash(self.re) 34 | 35 | complex __add__(self, complex n): 36 | return complex(self.re + n.re, self.im + n.im) 37 | 38 | complex __add__(self, float n): 39 | return self + complex(n) 40 | 41 | complex __mul__(self, complex n): 42 | return complex(self.re * n.re - self.im * n.im, 43 | self.im * n.re + self.re * n.im) 44 | 45 | complex __mul__(self, float n): 46 | return self * complex(n) 47 | -------------------------------------------------------------------------------- /demo/complex.py: -------------------------------------------------------------------------------- 1 | class complex: 2 | """A toy partial complex number implementation. Uses method and 3 | operator overloading and multiple dispatch.""" 4 | 5 | def __init__(self, float re, im=0): 6 | self.re = re 7 | self.im = im 8 | 9 | def __init__(self, complex n): 10 | self.__init__(n.re, n.im) 11 | 12 | def __str__(self): 13 | if self.im >= 0: 14 | return "({} + {}j)".format(self.re, self.im) 15 | else: 16 | return "({} - {}j)".format(self.re, -self.im) 17 | 18 | # Use multiple dispath for __eq__. 19 | 20 | def __eq__(self, n): # Default __eq__ overload 21 | return False 22 | 23 | def __eq__(self, complex n): 24 | return self.re == c.re and self.im == c.im 25 | 26 | def __eq__(self, float n): 27 | return self.re == n and self.im == 0 28 | 29 | def __hash__(self): 30 | if self.im: 31 | return hash((self.re, self.im)) 32 | else: 33 | return hash(self.re) 34 | 35 | def __add__(self, complex n): 36 | return complex(self.re + n.re, self.im + n.im) 37 | 38 | def __add__(self, float n): 39 | return self + complex(n) 40 | 41 | def __mul__(self, complex n): 42 | return complex(self.re * n.re - self.im * n.im, 43 | self.im * n.re + self.re * n.im) 44 | 45 | def __mul__(self, float n): 46 | return self * complex(n) 47 | -------------------------------------------------------------------------------- /demo/nlargest.py: -------------------------------------------------------------------------------- 1 | -- Usage: nlargest.alo [DIR [N]] 2 | -- 3 | -- Find the N largest subdirectories of DIR (default to '.' and 10). 4 | 5 | import os 6 | 7 | 8 | def Main(args) 9 | var n = 10 10 | var dir = '.' 11 | if args != [] 12 | dir = args[0] 13 | if args.length() > 1 14 | n = Int(args[1]) 15 | end 16 | end 17 | LargestDirs(n, dir) 18 | end 19 | 20 | 21 | -- Display the n largest subdirectories of dir. 22 | def LargestDirs(n, dir) 23 | var a = [] 24 | DirSizes(dir, a) 25 | a = Reversed(Sort(a)) 26 | for size, d in a[:n] 27 | Print('{-8:} {}'.format(size div 1024, d)) 28 | end 29 | end 30 | 31 | 32 | -- Append to res a tuple (size, subdir) for each subdirectory of dir and return 33 | -- the total size of files in dir. 34 | def DirSizes(dir, res) 35 | var size = 0 36 | for n in ListDir(dir) 37 | var p = Join(dir, n) 38 | if IsFile(p) 39 | size += Stat(p).size 40 | elif IsDir(p) and not IsLink(p) 41 | var s = DirSizes(p, res) 42 | res.append((s, NormPath(p))) 43 | size += s 44 | end 45 | end 46 | return size 47 | end 48 | -------------------------------------------------------------------------------- /demo/primes-s.py: -------------------------------------------------------------------------------- 1 | # Generate all prime numbers up to 1000 using the 2 | # sieve of Eratosthenes. 3 | 4 | import math 5 | import sys 6 | 7 | max = 1000 8 | 9 | # Calculate a table a where a[i] == True 10 | # iff i is a prime. 11 | a = [True] * (max + 1) 12 | for i in range(2, int(math.sqrt(max)) + 1): 13 | if a[i]: 14 | j = i * i 15 | while j <= max: 16 | a[j] = False 17 | j += i 18 | 19 | for i in range(2, max + 1): 20 | if a[i]: 21 | print(i) 22 | -------------------------------------------------------------------------------- /demo/primes.py: -------------------------------------------------------------------------------- 1 | # Generate all prime numbers up to 1000 using the 2 | # sieve of Eratosthenes. 3 | 4 | import math 5 | import sys 6 | 7 | max = 1000 8 | 9 | # Calculate a table a where a[i] == True 10 | # iff i is a prime. 11 | a = [True] * (max + 1) 12 | for i in range(2, int(math.sqrt(max)) + 1): 13 | if a[i]: 14 | j = i * i 15 | while j <= max: 16 | a[j] = False 17 | j += i 18 | 19 | for i in range(2, max + 1): 20 | if a[i]: 21 | print(i) 22 | -------------------------------------------------------------------------------- /demo/sieve2-s.py: -------------------------------------------------------------------------------- 1 | import itertools 2 | ||from typing import Iterator|| 3 | 4 | def iter_primes||() -> Iterator[int]||: 5 | # An iterator of all numbers between 2 and 6 | # +infinity 7 | numbers = itertools.count(2) 8 | 9 | # Generate primes forever 10 | while True: 11 | # Get the first number from the iterator 12 | # (always a prime) 13 | prime = next(numbers) 14 | yield prime 15 | 16 | # This code iteratively builds up a chain 17 | # of filters... 18 | numbers = filter(prime.__rmod__, numbers) 19 | 20 | for p in iter_primes(): 21 | if p > 1000: 22 | break 23 | print(p) 24 | -------------------------------------------------------------------------------- /demo/sieve2.py: -------------------------------------------------------------------------------- 1 | import itertools 2 | 3 | 4 | def iter_primes||()||: 5 | # An iterator of all numbers between 2 and 6 | # +infinity 7 | numbers = itertools.count(2) 8 | 9 | # Generate primes forever 10 | while True: 11 | # Get the first number from the iterator 12 | # (always a prime) 13 | prime = next(numbers) 14 | yield prime 15 | 16 | # This code iteratively builds up a chain 17 | # of filters... 18 | numbers = filter(prime.__rmod__, numbers) 19 | 20 | for p in iter_primes(): 21 | if p > 1000: 22 | break 23 | print(p) 24 | -------------------------------------------------------------------------------- /demo/wordfreq-orig.py: -------------------------------------------------------------------------------- 1 | # Usage: wordfreq.alo N FILE ... 2 | # 3 | # Display the N most frequent words in file(s). Assume that the files are 4 | # text files encoded using the platform default encoding. 5 | 6 | import sys 7 | import re 8 | 9 | def main(): 10 | if not sys.argv[2:]: 11 | raise RuntimeError('Usage: wordfreq.alo N FILE ...') 12 | 13 | d = {} 14 | n = int(sys.argv[1]) 15 | 16 | for fnam in sys.argv[2:]: 17 | s = open(fnam, 'r').read() 18 | for word in re.sub('\W', ' ', s).split(): 19 | d[word] = d.get(word, 0) + 1 20 | 21 | l = [(freq, word) for word, freq in d.items()] # Use _list comprehension_ 22 | 23 | for freq, word in reversed(sorted(l)[-n:]): # Tuple unpacking 24 | print('%-6d %s' % (freq, word)) 25 | 26 | main() 27 | -------------------------------------------------------------------------------- /demo/wordfreq-s.py: -------------------------------------------------------------------------------- 1 | # Display the frequencies of words in a file. 2 | 3 | import sys 4 | import re 5 | ||from typing import Dict|| 6 | 7 | if not sys.argv[1:]: 8 | raise RuntimeError('Usage: wordfreq FILE') 9 | 10 | ||d = {} # type: Dict[str, int]|| 11 | 12 | with open(sys.argv[1]) as f: 13 | for s in f: 14 | for word in re.sub('\W', ' ', s).split(): 15 | d[word] = d.get(word, 0) + 1 16 | 17 | # Use list comprehension 18 | l = [(freq, word) for word, freq in d.items()] 19 | 20 | for freq, word in sorted(l): 21 | print('%-6d %s' % (freq, word)) 22 | -------------------------------------------------------------------------------- /demo/wordfreq.py: -------------------------------------------------------------------------------- 1 | # Display the frequencies of words in a file. 2 | 3 | import sys 4 | import re 5 | 6 | 7 | if not sys.argv[1:]: 8 | raise RuntimeError('Usage: wordfreq FILE') 9 | 10 | ||d = {}|| 11 | 12 | with open(sys.argv[1]) as f: 13 | for s in f: 14 | for word in re.sub('\W', ' ', s).split(): 15 | d[word] = d.get(word, 0) + 1 16 | 17 | # Use list comprehension 18 | l = [(freq, word) for word, freq in d.items()] 19 | 20 | for freq, word in sorted(l): 21 | print('%-6d %s' % (freq, word)) 22 | -------------------------------------------------------------------------------- /examples.html: -------------------------------------------------------------------------------- 1 | $title mypy - Examples$ 2 | $keywords mypy example, mypy code$ 3 | $description Mypy example programs, with separate dynamically and statically typed variants.$ 4 | 5 |
Here are some mypy example programs. Each example has dynamically typed 9 | Python/mypy code and equivalent statically typed mypy code side by 10 | side. Every program is still valid Python 3.x. 11 | All differences between the variants are 12 | highlighted. 13 | 14 |
In this example we add an explicit type declaration for the variable d, as 19 | it is not obvious from the local context. 20 | 21 |
In this example we chose to use integers to represent balance. 26 | This would be fine in a game, for example, but in other applications a 27 | different type would make more sense. 28 | 29 |
This example was adapted from the 30 | Python wiki (with 31 | the standard Python license). 32 | 33 |
Like the bank account example, this was adapted from the Python wiki. 38 | -------------------------------------------------------------------------------- /faq.html: -------------------------------------------------------------------------------- 1 | $title mypy - FAQ$ 2 | $keywords mypy frequently asked questions, mypy vs python, mypy vs pypy, dynamic vs static typing$ 3 | $description Frequently asked questions about mypy (and answers).$ 4 | 5 |
This page has been moved to here. 9 | 10 |
Older news 50 | 51 |
Migrate existing code to static typing, a function at a time. 76 | You can freely mix static and dynamic typing within a program, within 77 | a module or within an expression. No need to 78 | give up dynamic typing — use static typing 79 | when it makes sense. 80 | Often just adding function signatures gives you statically typed code. 81 | Mypy can infer the types of other 82 | variables. 83 | 84 |
Mypy type checks programs that have type annotations conforming to 87 | PEP 484. 88 | Getting started is easy if you know Python. 89 | The aim is to support almost all Python language constructs in mypy. 90 | 91 |
Mypy has a powerful, modern type system with features such as bidirectional type inference, 94 | generics, callable types, abstract base classes, multiple inheritance and tuple types. 95 | 96 |
Many commonly used libraries have stubs (statically typed interface 99 | definitions) that allow mypy to check that your code uses the 100 | libraries correctly. 101 | 102 |
dmypy run
and a host of other small improvements.
358 | Read the
359 | blog post
360 | to see what's changed.
361 | (Note that we're once again starting to link blog posts here.)
362 | author: Michael J. Sullivan
363 | - title: Dropbox releases PyAnnotate
364 | date: 15 November 2017
365 | text: |
366 | Dropbox has released an open source tool for automatically generating
367 | type annotations based on runtime type collection. See the
368 | blog post
369 | for details.
370 | author: Guido van Rossum
371 | - title: For more mypy news see the mypy blog.
372 | date: 24 October 2017
373 | text: |
374 | We're increasing mypy's release frequency to about once per three weeks.
375 | We no longer will link here to each separate release blog post; just check the
376 | mypy blog for news.
377 | Two new versions, 0.530 and 0.540, were released since the last news item below.
378 | author: Guido van Rossum
379 | - title: Mypy 0.521 released
380 | date: 25 July 2017
381 | text: |
382 | Mypy 0.521 was released. It is a minor bugfix release for 0.520, and everyone using
383 | 0.520 should upgrade.
384 | Read the
385 | blog post
386 | to see what's changed.
387 | author: Jukka
388 | - title: Mypy 0.520 released
389 | date: 10 July 2017
390 | text: |
391 | Mypy 0.520 was released. It adds better control for Any types, __setattr__ support,
392 | more flexible NamedTuples, and many more improvements and bug fixes.
393 | Read the
394 | blog post
395 | to see what's changed.
396 | author: Jukka
397 | - title: Mypy 0.510 released
398 | date: 5 May 2017
399 | text: |
400 | Mypy 0.510 was released. It adds support for overloads in source files and more
401 | flexible callables, but these are just a few of the improvements and fixes.
402 | Read the
403 | blog post
404 | to see what's changed.
405 | author: Jukka
406 | - title: Mypy 0.501 released
407 | date: 1 Mar 2017
408 | text: |
409 | Mypy 0.501 was released. It switches to a new default parser and supports Python
410 | 3.6 features by default. These are also many other improvements and fixes.
411 | Read the
412 | blog post
413 | to see what's changed.
414 | author: Jukka
415 | - title: Mypy 0.470 released
416 | date: 13 Jan 2017
417 | text: |
418 | Mypy 0.470 was released. This release release switches to the PyPI package name "mypy"
419 | instead of "mypy-lang" and switches to a new version numbering scheme. It also
420 | includes many other improvements and fixes.
421 | Read the
422 | blog post
423 | to see what's changed.
424 | author: Jukka
425 | - title: Mypy 0.4.6 released
426 | date: 21 Nov 2016
427 | text: |
428 | Mypy 0.4.6 was released. This release adds support
429 | for generic type aliases, missing return statement detection and
430 | self types. It also improves type checking of import cycles and includes
431 | many other improvements and fixes.
432 | Read the
433 | blog post
434 | to see what's changed.
435 | author: Jukka
436 | - title: Mypy 0.4.5 released
437 | date: 7 Oct 2016
438 | text: |
439 | Mypy 0.4.5 was released. This release adds support
440 | for mypy configuration files and Python 3.6 variable annotations and includes
441 | many other improvements and fixes. There is now also a
442 | Gitter chat room.
443 | Read the
444 | blog post
445 | to see what's changed.
446 | author: Jukka
447 | - title: Mypy 0.4.4 released
448 | date: 25 Aug 2016
449 | text: |
450 | Mypy 0.4.4 was released. This release adds support
451 | for async/await and NewType and includes many other
452 | improvements and fixes. Read the
453 | blog post
454 | to see what's changed.
455 | author: Jukka
456 | - title: Mypy 0.4.3 released
457 | date: 14 Jul 2016
458 | text: |
459 | Mypy 0.4.3 was released. This release adds support
460 | for experimental strict checking of optional types (enabled using the
461 | --strict-optional command line option) and includes many other
462 | improvements and fixes. Read the
463 | blog post
464 | to see what's changed.
465 | author: Jukka
466 | - title: Mypy 0.4.2 released
467 | date: 9 Jun 2016
468 | text: |
469 | Mypy 0.4.2 was released. This release focuses on bug fixes. It also adds support
470 | for Type[C]. Read the
471 | blog post
472 | to see what's changed.
473 | author: Jukka
474 | - title: Mypy 0.4 released
475 | date: 5 May 2016
476 | text: |
477 | Mypy 0.4 was released. It's focused on faster type checking, usability improvements
478 | and bug fixes. Read the
479 | blog post
480 | to see what's changed.
481 | author: Jukka
482 | - title: Mypy 0.3 released
483 | date: 19 Feb 2016
484 | text: |
485 | Mypy 0.3 was released. It's focused on Python 2 support and better PEP 484
486 | compatibility, but it's much improved in general. Read the
487 | blog post
488 | to see what's changed. Note that the mypy GitHub repo was moved to
489 | a new URL
490 | (https://github.com/python/mypy).
491 | author: Jukka
492 | - title: Mypy 0.2 released
493 | date: 5 Apr 2015
494 | text: |
495 | Mypy 0.2 was released. It's focused on PEP 484 (Type Hinting) draft compatibility and
496 | more complete Python feature support.
497 | Blog post
498 | author: Jukka
499 | - title: Mypy and the PEP 484 (type hinting) draft
500 | date: 17 Jan 2015
501 | text: |
502 | Read my blog post
503 | about PEP 484 (Type Hinting)
504 | draft, which proposes adding a standard
505 | type annotation syntax strongly inspired by mypy to the upcoming Python 3.5 release.
506 | author: Jukka
507 | - title: Revamped documentation
508 | date: 23 Nov 2014
509 | text: |
510 | We've been converting mypy documentation to reStructuredText/Sphinx and
511 | improving it in the process
512 | (thanks to Ryan Gonzalez for the bulk of the work!). The new docs are
513 | now public and hosted on readthedocs.org.
514 | The source code is available on GitHub.
515 | author: Jukka
516 | - title: Mypy only type checks, it does not run programs
517 | date: 31 Aug 2014
518 | text: |
519 | Mypy no longer runs your programs, it just type checks
520 | them. Use a Python interpreter to run programs.
521 | author: Jukka
522 | - title: Moving forward again
523 | date: 24 Jul 2014
524 | text: |
525 | Mypy development is seeing progress, after a pause.
526 | Stay tuned for exciting news! And we're still looking for new contributors.
527 | Also updated the web site to reflect the current development focus: static type
528 | checking.
529 | author: Jukka
530 | - title: Mypy switches to Python-compatible syntax
531 | date: 2 Jul 2013
532 | text: |
533 | Mypy now has a Python-compatible syntax! The
534 | implementation is already self-hosting. Have a look at the
535 | rewritten Mypy Tutorial (formerly Mypy
536 | Overview), README
537 | and the code. Also
538 | updated the roadmap. See the related blog post.
539 | author: Jukka
540 | - title: "PyCon Update: Python-compatible syntax for mypy?"
541 | date: 15 Apr 2013
542 | text: |
543 | I wrote a blog post about
544 | my PyCon visit and a new, Python-compatible syntax idea.
545 | The short summary is that mypy may get a 100% Python-compatible syntax
546 | in the future! Also Python 2.x support, structural subtyping and real
547 | multiple inheritance are being planned.
548 | author: Jukka
549 | - title: Mypy at PyCon US 2013 (Santa Clara, CA)
550 | date: 13 Mar 2012
551 | text: |
552 | I will present a poster about mypy at
553 | PyCon US this weekend. If you
554 | are coming to PyCon, you are welcome to come for a chat.
555 | author: Jukka
556 | - title: Mypy Development Update #2
557 | date: 13 Mar 2012
558 | text: |
559 | A lot has happened in the mypy project in the last
560 | few months.
561 | I've written a
562 | blog post
563 | about the most interesting recent developments.
564 | author: Jukka
565 | - title: Wiki opened
566 | date: 14 Dec 2012
567 | text: |
568 | The mypy wiki is now open. It
569 | contains useful information for both users and mypy developers, and it is
570 | editable by all.
571 | Related
572 | blog post
573 | author: Jukka
574 | - title: Source code released
575 | date: 7 Dec 2012
576 | text: |
577 | Mypy source code is
578 | now available on GitHub.
579 | Fork it and give it a try!
580 | The current prototype supports a useful but somewhat limited subset of
581 | Python
582 | features (library support is still limited) and
583 | lets you type check programs and run them by translating to Python.
584 | As such there is no performance boost yet.
585 | author: Jukka
586 | - title: Mypy has a blog and a newsletter, and is on Twitter
587 | date: 4 Dec 2012
588 | text: |
589 | I set up a
590 | mypy status blog. From now on,
591 | all important mypy updates will be posted there. There's also
592 | an Atom feed
593 | (it has been requested by several people). You can follow mypy development
594 | on Twitter (@mypyproject).
595 | Finally, you can also subscribe to an
596 | email
597 | newsletter hosted at Google Groups.
598 | author: Jukka
599 | - title: Mypy is self-hosting + language changes
600 | date: 2 Dec 2012
601 | text: |
602 | The mypy implementation has been self-hosting for about two weeks now (on
603 | top of CPython)! We are happily eating our own dog food.
604 | The source release is Real Soon Now. The release is a bit late as we
605 | decided to make some changes and add new features just before the release.
606 | author: Jukka
607 | - title: Mypy at PyCon Finland
608 | date: 25 Oct 2012
609 | text: |
610 | I gave a talk on mypy at
611 | PyCon Finland.
612 | Slides
613 | are available.
614 | author: Jukka
615 |
--------------------------------------------------------------------------------
/out/.gitignore:
--------------------------------------------------------------------------------
1 | *.html
2 | favicon.ico
3 | static/
4 |
--------------------------------------------------------------------------------
/overview.html:
--------------------------------------------------------------------------------
1 | $title mypy - Tutorial$
2 | $keywords mypy overview, mypy introduction, mypy tutorial, mypy documentation$
3 | $description Mypy tutorial.$
4 |
5 | This page has been moved to Mypy Documentation. 9 | 10 |
The roadmap has a new 9 | location. 10 | 11 |
This page has been moved to Mypy Documentation. 9 | 10 |