Mypy 1.8.0 Documentation
imports The mypy command line Specifying what to type check Optional arguments Config file Import discovery Platform configuration Disallow dynamic typing Untyped definitions and calls None and Optional handling Config file format Per-module and global options Inverting option values Example mypy.ini Import discovery Platform configuration Disallow dynamic typing Untyped definitions and calls None and Optional handling a method [method-assign] Check type variable values [type-var] Check uses of various operators [operator] Check indexing operations [index] Check list items [list-item] Check dict items [dict-item] Check0 码力 | 318 页 | 271.55 KB | 1 年前3Mypy 1.10.0+dev Documentation
imports The mypy command line Specifying what to type check Optional arguments Config file Import discovery Platform configuration Disallow dynamic typing Untyped definitions and calls None and Optional handling Config file format Per-module and global options Inverting option values Example mypy.ini Import discovery Platform configuration Disallow dynamic typing Untyped definitions and calls None and Optional handling a method [method-assign] Check type variable values [type-var] Check uses of various operators [operator] Check indexing operations [index] Check list items [list-item] Check dict items [dict-item] Check0 码力 | 318 页 | 270.84 KB | 1 年前3Mypy 1.8.0 Documentation
running mypy on your existing Python code, it will most likely report little to no errors. This is a feature! It makes it easy to adopt mypy incrementally. In order to get useful diagnostics from mypy, you hints to your code rather than adding them all at once. Similarly, when you are prototyping a new feature, it may be convenient to initially implement the code using dynamic typing and only add type hints x: Tuple[int, ...] = (1, 2, 3) from typing import Union, Optional # On Python 3.10+, use the | operator when something could be one of a few types x: list[int | str] = [3, 5, "test", "fun"] # Python 30 码力 | 234 页 | 902.89 KB | 1 年前3Mypy 1.10.0+dev Documentation
running mypy on your existing Python code, it will most likely report little to no errors. This is a feature! It makes it easy to adopt mypy incrementally. In order to get useful diagnostics from mypy, you hints to your code rather than adding them all at once. Similarly, when you are prototyping a new feature, it may be convenient to initially implement the code using dynamic typing and only add type hints x: Tuple[int, ...] = (1, 2, 3) from typing import Union, Optional # On Python 3.10+, use the | operator when something could be one of a few types x: list[int | str] = [3, 5, "test", "fun"] # Python 30 码力 | 234 页 | 913.89 KB | 1 年前3Celery 1.0 Documentation
local If you start the rabbitmq server, your rabbit node should now be rabbit@myhost, as verified by rabbitmqctl: $ sudo rabbitmqctl status Status of node rabbit@myhost ... [{running_applications,[{rabbit daemon starts. This is useful to add tasks if you are not using django or cannot use task auto-discovery. • CELERY_SEND_EVENTS Send events so the worker can be monitored by tools like celerymon. • C message, it will be re-sent at a later point in time. This guarantees delivery and we respect this feature here by not acknowledging the message until the clicks has actually been written to disk. Note:0 码力 | 123 页 | 400.69 KB | 1 年前3Celery 1.0 Documentation
local If you start the rabbitmq server, your rabbit node should now be rabbit@myhost, as verified by rabbitmqctl: $ sudo rabbitmqctl status Status of node rabbit@myhost ... [{running_applications,[{rabbit daemon starts. This is useful to add tasks if you are not using django or cannot use task auto- discovery. CELERY_SEND_EVENTS Send events so the worker can be monitored by tools like celerymon. CELE message, it will be re-sent at a later point in time. This guarantees delivery and we respect this feature here by not acknowledging the message until the clicks has actually been written to disk. Note:0 码力 | 221 页 | 283.64 KB | 1 年前3Celery 2.0 Documentation
local If you start the rabbitmq server, your rabbit node should now be rabbit@myhost, as verified by rabbitmqctl: $ sudo rabbitmqctl status Status of node rabbit@myhost ... [{running_applications,[{rabbit nodes to inspect. >>> i = inspect(["worker1.example.com", "worker2.example.com"]) # Specify a single node to inspect. >>> i = inspect("worker1.example.com") Dump of registered tasks You can get a list of "binding_key": "default"}} CELERY_DEFAULT_QUEUE = "default" How the queues are defined The point with this feature is to hide the complex AMQP protocol for users with only basic needs. However — you may still be0 码力 | 165 页 | 492.43 KB | 1 年前3Python 标准库参考指南 2.7.18
254 9.8 functools —高阶函数和可调用对象上的操作 . . . . . . . . . . . . . . . . . . . . . . . . . . 267 9.9 operator —标准运算符替代函数 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 10 文件和目录访问 279 the call to compile are ignored. Future 语句使用比特位来指定,多个语句可以通过按位或来指定。具体特性的比特位可以通 过__future__ 模块中的 _Feature 类的实例的 compiler_flag 属性来获得。 7 The Python Library Reference, 发布 2.7.18 This function raises SyntaxError a float result is delivered. For example, 10**2 returns 100, but 10**-2 returns 0.01. (This last feature was added in Python 2.2. In Python 2.1 and before, if both arguments were of integer types and the0 码力 | 1552 页 | 7.42 MB | 9 月前3Python 标准库参考指南 2.7.18
254 9.8 functools —高阶函数和可调用对象上的操作 . . . . . . . . . . . . . . . . . . . . . . . . . . 267 9.9 operator —标准运算符替代函数 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 10 文件和目录访问 279 the call to compile are ignored. Future 语句使用比特位来指定,多个语句可以通过按位或来指定。具体特性的比特位可以通 过__future__ 模块中的 _Feature 类的实例的 compiler_flag 属性来获得。 7 The Python Library Reference, 发布 2.7.18 This function raises SyntaxError a float result is delivered. For example, 10**2 returns 100, but 10**-2 returns 0.01. (This last feature was added in Python 2.2. In Python 2.1 and before, if both arguments were of integer types and the0 码力 | 1552 页 | 7.42 MB | 9 月前3Python 标准库参考指南 2.7.18
254 9.8 functools —高阶函数和可调用对象上的操作 . . . . . . . . . . . . . . . . . . . . . . . . . . 267 9.9 operator —标准运算符替代函数 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269 10 文件和目录访问 279 the call to compile are ignored. Future 语句使用比特位来指定,多个语句可以通过按位或来指定。具体特性的比特位可以通 过__future__ 模块中的 _Feature 类的实例的 compiler_flag 属性来获得。 7 The Python Library Reference, 发布 2.7.18 This function raises SyntaxError a float result is delivered. For example, 10**2 returns 100, but 10**-2 returns 0.01. (This last feature was added in Python 2.2. In Python 2.1 and before, if both arguments were of integer types and the0 码力 | 1552 页 | 7.42 MB | 9 月前3
共 479 条
- 1
- 2
- 3
- 4
- 5
- 6
- 48