Skip to content

Flake8 extension for detecting incorrect QT translation

License

Notifications You must be signed in to change notification settings

ostr00000/flake8-qt-tr

Repository files navigation

flake8-qt-tr

PyPI Python 3.10 License: MIT pre-commit.ci status Code style: black Ruff

Flake8 extension for detecting incorrect QT translations.

Installation

with pip:

pip install flake8-qt-tr

with pre-commit (doc):

repos:
  - repo: https://github.com/PyCQA/flake8
    rev: '' # pick a git hash/tag
    hooks:
      - id: flake8
        additional_dependencies:
          # ...
          - flake8-qt-tr

Error Codes

Code Description Example
TR011 Translation is formatted by f-string. self.tr(f"Value: {val}")
TR012 Translation is formatted by format method. self.tr("Value: {}".format(val))
TR013 Translation is formatted by printf-style. self.tr("Value: %s" % val)

About

Flake8 extension for detecting incorrect QT translation

Resources

License

Stars

Watchers

Forks

Packages

No packages published