Skip to main content

Build Status Coverage pre-commit.ci status

dequote-annotations

A pre-commit hook to automatically remove string literals as type hints from argument, return, and class variable type annotations. Will only make the replacement if your file contains from __future__ import annotations.

Installation

pip install dequote-annotations

As a pre-commit hook

See pre-commit for instructions

Sample .pre-commit-config.yaml:

-   repo: https://github.com/MarcoGorelli/dequote-annotations
    rev: v0.2.3
    hooks:
    -   id: dequote-annotations

Command-line example

$ cat myfile.py
myvar: 'str'
$ dequote-annotations myfile.py
$ cat myfile.py
myvar: str

See also

Check out pyupgrade, which I learned a lot from when writing this.

Release files for dequote-annotations 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dequote-annotations 0.2.3
File Size Uploaded
dequote_annotations-0.2.3.tar.gz 3.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dequote-annotations 0.2.3
File Interpreter ABI Platform
dequote_annotations-0.2.3-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 9.1 kB

Release files / dequote_annotations-0.2.3.tar.gz

Download URL dequote_annotations-0.2.3.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
b9f12cbfdb67a83a81db9eb1cc3b5ad97160feea4ec02766dafc50bb2c64e562
BLAKE2b-256 checksum
How to use checksums
b0f101dd7995d126a5e76843514d6f729f6dee8a955d752134924492cc0e50b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

Release files / dequote_annotations-0.2.3-py2.py3-none-any.whl

Download URL dequote_annotations-0.2.3-py2.py3-none-any.whl
Size 5.3 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
08f7cf601996081c8eb171660325082624934801d5d662606428018fdb9d6c3d
BLAKE2b-256 checksum
How to use checksums
ab21b81b521a541698fee900531957e3b11e0a1b4b7d9c5084e5205e49e28042
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 release files

0.2.2

2 release files

0.2.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page