Typed interface stubs for Pythonista iOS

Overview

Pythonista Stubs

PyPI GitHub issues Black Build Status

Stubs for the Pythonista iOS API. This allows for better error detection and IDE / editor autocomplete.

Installation and Usage

pip install pythonista-stubs --upgrade

N.b. you may need to pip3, particularly if you installed python3 with homebrew

Type checking can then be performed with mypy

See also: mypy integrations

API Coverage

Module Status
appex
canvas
cb
clipboard
console
dialogs
contacts
editor
keychain
linguistictagger
location
motion
notification
objc_util
photos
reminders
scene
sound
speech
twitter
ui

Built With

PEPs

Contributing

Please file a bug report for any issues you find. Even more excellent than a good bug report is a fix for a bug, or the implementation of a much-needed stub. We'd love to have your contributions.

We use the usual GitHub pull-request flow, which may be familiar to you if you've contributed to other projects on GitHub. For the mechanics, see Mypy's git and GitHub workflow help page, or GitHub's own documentation.

Code Formatting

This project is linted with pyflakes and makes strict use of Black for code formatting.

Conventions

  • long functions and methods should be split up with one argument per line
  • all function bodies should be empty
  • prefer ... over pass
  • prefer ... on the same line as the class/function signature
  • avoid vertical whitespace between consecutive module-level functions, names, or methods and fields within a single class
  • use a single blank line between top-level class definitions
  • do not use docstrings
  • use variable annotations instead of type comments
  • for arguments with a type and a default, use spaces around the =
  • use float instead of Union[int, float]
  • avoid Union return types: https://github.com/python/mypy/issues/1693
  • imports in stubs are considered private unless they use the form from library import name as name
  • avoid using the Any type when possible
  • type variables and aliases for legibility reasons should be prefixed with an underscore to make it obvious to the reader they are not part of the stubbed API.
  • these conventions derived from typeshed

Code of Conduct

Everyone participating in this community is expected to treat other people with respect and more generally to follow the guidelines articulated in the Python Community Code of Conduct.

Authors

Disclaimer

This is not an official project and is not associated with omz:software

License

Apache License 2.0

You might also like...
A simple password manager I typed with python using MongoDB .
A simple password manager I typed with python using MongoDB .

Python with MongoDB A simple python code example using MongoDB. How do i run this code • First of all you need to have a python on your computer. If y

convert a dict-list object from / to a typed object(class instance with type annotation)

objtyping 带类型定义的对象转换器 由来 Python不是强类型语言,开发人员没有给数据定义类型的习惯。这样虽然灵活,但处理复杂业务逻辑的时候却不够方便——缺乏类型检查可能导致很难发现错误,在IDE里编码时也没

A Simple, LightWeight, Statically-Typed Python3 API wrapper for GogoAnime.

AniKimi API A Simple, LightWeight, Statically-Typed Python3 API wrapper for GogoAnime The v2 of gogoanimeapi (depreciated) Made with JavaScript and Py

Statically typed BNF with semantic actions; A frontend of frontend frameworks; Use your grammar everywhere.

Statically typed BNF with semantic actions; A frontend of frontend frameworks; Use your grammar everywhere.

Run functions in parallel easily, with their results typed correctly!

typesafe_parmap pip install pip install typesafe-parmap Run functions in parallel safely with typesafe parmap! GitHub: https://github.com/thejaminato

Solutions to all 6 programming assignments in Dan Boneh's course Cryptography I, in statically typed Python.

Solutions to Cryptography I programming exercises Dan Boneh from Stanford University has an excellent online course on cryptography, hosted on Courser

cross-editor syntax highlighter for Lua, showing some merit of Typed BNF
cross-editor syntax highlighter for Lua, showing some merit of Typed BNF

Cross-editor contextual syntax highlighter via Typed BNF Do you like "one grammar, syntax highlighters everywhere?" 喜欢我一个文法,到处高亮吗? PS: NOTE that paren

Pypixiv - A fully-typed, asynchronous api wrapper for pixiv

pypixiv this library is a fully-typed, asynchronous api wrapper for pixiv. featu

Collection of library stubs for Python, with static types

typeshed About Typeshed contains external type annotations for the Python standard library and Python builtins, as well as third party packages as con

PEP-484 stubs for Django

pep484 stubs for Django This package contains type stubs and a custom mypy plugin to provide more precise static types and type inference for Django f

PEP-484 stubs for django-rest-framework

pep484 stubs for Django REST framework Mypy stubs for DRF 3.12.x. Supports Python 3.6, 3.7, 3.8 and 3.9. Installation pip install djangorestframework-

open source tools to generate mypy stubs from protobufs

mypy-protobuf: Generate mypy stub files from protobuf specs We just released a new major release mypy-protobuf 2. on 02/02/2021! It includes some back

Mypy stubs, i.e., type information, for numpy, pandas and matplotlib

Mypy type stubs for NumPy, pandas, and Matplotlib This is a PEP-561-compliant stub-only package which provides type information for matplotlib, numpy

Re-apply type annotations from .pyi stubs to your codebase.

retype Re-apply type annotations from .pyi stubs to your codebase. Usage Usage: retype [OPTIONS] [SRC]... Re-apply type annotations from .pyi stubs

PEP-484 typing stubs for SQLAlchemy 1.4 and SQLAlchemy 2.0

SQLAlchemy 2 Stubs These are PEP-484 typing stubs for SQLAlchemy 1.4 and 2.0. They are released concurrently along with a Mypy extension which is desi

Stubmaker is an easy-to-use tool for generating python stubs.

Stubmaker is an easy-to-use tool for generating python stubs. Requirements Stubmaker is to be run under Python 3.7.4+ No side effects during

python package for generating typescript grpc-web stubs from protobuf files.

grpc-web-proto-compile NOTE: This package has been superseded by romnn/proto-compile, which provides the same functionality but offers a lot more flex

Pymxs, the 3DsMax bindings of Maxscript to Python doesn't come with any stubs

PyMXS Stubs generator What Pymxs, the 3DsMax bindings of Maxscript to Python doe

HMLLDB is a collection of LLDB commands to assist in the debugging of iOS apps.
HMLLDB is a collection of LLDB commands to assist in the debugging of iOS apps.

HMLLDB is a collection of LLDB commands to assist in the debugging of iOS apps. 中文介绍 Features Non-intrusive. Your iOS project does not need to be modi

Comments
  • Stubs for the `sound` module

    Stubs for the `sound` module

    Stubs for the sound module. I wasn't sure about a set of types based on the documentation (whether they would be defined as float or int) so I reversed them to be sure. Code is added below, for the sake of completeness for the documentation.

    >>> def test_recording():
    ...   rec = sound.Recorder('test.m4a')
    ...   rec.record()
    ...   time.sleep(2)
    ...   print(rec.current_time, type(rec.current_time))
    ...   print(rec.recording)
    ...   time.sleep(3)
    ...   rec.stop()
    ...   
    >>> test_recording()
    2.0232426303854876 <class 'float'>
    True
    >>> def test_playback():
    ...   play = sound.Player('test.m4a')
    ...   play.play()
    ...   time.sleep(2)
    ...   print(play.duration, type(play.duration))
    ...   print(play.current_time, type(play.current_time))
    ...   
    >>> test_playback()
    5.037278911564626 <class 'float'>
    1.9657596371882087 <class 'float'>
    

    Although there are no merge conflicts with master, when/if #1 gets merged, there will be a conflict with setup.py. I put it as draft PR to prevent the merge conflict there, and will change that after a merge of #1.

    opened by boisei0 3
  • Added stubs for `speech`

    Added stubs for `speech`

    I've created stubs for the speech module. As mentioned in the commit comment, the top level get_languages function is a bit of a guess whether or not it should be publicly exposed and supported with typings.

    opened by boisei0 3
Releases(v0.0.2)
Owner
Harold Martin
🌅
Harold Martin
Flake8 plugin that checks import order against various Python Style Guides

flake8-import-order A flake8 and Pylama plugin that checks the ordering of your imports. It does not check anything else about the imports. Merely tha

Python Code Quality Authority 270 Nov 24, 2022
Code audit tool for python.

Pylama Code audit tool for Python and JavaScript. Pylama wraps these tools: pycodestyle (formerly pep8) © 2012-2013, Florent Xicluna; pydocstyle (form

Kirill Klenov 967 Jan 07, 2023
Utilities for pycharm code formatting (flake8 and black)

Pycharm External Tools Extentions to Pycharm code formatting tools. Currently supported are flake8 and black on a selected code block. Usage Flake8 [P

Haim Daniel 13 Nov 03, 2022
The strictest and most opinionated python linter ever!

wemake-python-styleguide Welcome to the strictest and most opinionated python linter ever. wemake-python-styleguide is actually a flake8 plugin with s

wemake.services 2.1k Jan 01, 2023
Simple Python style checker in one Python file

pycodestyle (formerly called pep8) - Python style guide checker pycodestyle is a tool to check your Python code against some of the style conventions

Python Code Quality Authority 4.7k Jan 01, 2023
Mypy stubs, i.e., type information, for numpy, pandas and matplotlib

Mypy type stubs for NumPy, pandas, and Matplotlib This is a PEP-561-compliant stub-only package which provides type information for matplotlib, numpy

Predictive Analytics Lab 194 Dec 19, 2022
Flake8 extension for checking quotes in python

Flake8 Extension to lint for quotes. Major update in 2.0.0 We automatically encourage avoiding escaping quotes as per PEP 8. To disable this, use --no

Zachary Heller 157 Dec 13, 2022
MonkeyType as a pytest plugin.

MonkeyType as a pytest plugin.

Marius van Niekerk 36 Nov 24, 2022
Plugin for mypy to support zope.interface

Plugin for mypy to support zope.interface The goal is to be able to make zope interfaces to be treated as types in mypy sense. Usage Install both mypy

Shoobx 36 Oct 29, 2022
Flake8 extension to provide force-check option

flake8-force Flake8 extension to provide force-check option. When this option is enabled, flake8 performs all checks even if the target file cannot be

Kenichi Maehashi 9 Oct 29, 2022
Run isort, pyupgrade, mypy, pylint, flake8, and more on Jupyter Notebooks

Run isort, pyupgrade, mypy, pylint, flake8, mdformat, black, blacken-docs, and more on Jupyter Notebooks ✅ handles IPython magics robustly ✅ respects

663 Jan 08, 2023
Pylint plugin to enforce some secure coding standards for Python.

Pylint Secure Coding Standard Plugin pylint plugin that enforces some secure coding standards. Installation pip install pylint-secure-coding-standard

Nguyen Damien 2 Jan 04, 2022
flake8 plugin which checks that typing imports are properly guarded

flake8-typing-imports flake8 plugin which checks that typing imports are properly guarded installation pip install flake8-typing-imports flake8 codes

Anthony Sottile 50 Nov 01, 2022
Unbearably fast O(1) runtime type-checking in pure Python.

Look for the bare necessities, the simple bare necessities. Forget about your worries and your strife. — The Jungle Book.

beartype 1.4k Jan 01, 2023
PEP-484 typing stubs for SQLAlchemy 1.4 and SQLAlchemy 2.0

SQLAlchemy 2 Stubs These are PEP-484 typing stubs for SQLAlchemy 1.4 and 2.0. They are released concurrently along with a Mypy extension which is desi

SQLAlchemy 139 Dec 30, 2022
docstring style checker

pydocstyle - docstring style checker pydocstyle is a static analysis tool for checking compliance with Python docstring conventions. pydocstyle suppor

Python Code Quality Authority 982 Jan 03, 2023
A python documentation linter which checks that the docstring description matches the definition.

Darglint A functional docstring linter which checks whether a docstring's description matches the actual function/method implementation. Darglint expe

Terrence Reilly 463 Dec 31, 2022
:sparkles: Surface lint errors during code review

✨ Linty Fresh ✨ Keep your codebase sparkly clean with the power of LINT! Linty Fresh parses lint errors and report them back to GitHub as comments on

Lyft 183 Dec 18, 2022
Static type checker for Python

Static type checker for Python Speed Pyright is a fast type checker meant for large Python source bases. It can run in a “watch” mode and performs fas

Microsoft 9.2k Jan 03, 2023
mypy plugin to type check Kubernetes resources

kubernetes-typed mypy plugin to dynamically define types for Kubernetes objects. Features Type checking for Custom Resources Type checking forkubernet

Artem Yarmoliuk 16 Oct 10, 2022