Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

flake8-pep3101

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flake8-pep3101

Checks for old string formatting

  • 2.1.0
  • PyPI
  • Socket score

Maintainers
1

.. -- coding: utf-8 --

.. image:: https://github.com/gforcada/flake8-pep3101/actions/workflows/testing.yml/badge.svg?branch=master :target: https://github.com/gforcada/flake8-pep3101/actions/workflows/testing.yml

.. image:: https://coveralls.io/repos/gforcada/flake8-pep3101/badge.svg?branch=master :target: https://coveralls.io/github/gforcada/flake8-pep3101?branch=master

Flake8 PEP 3101 plugin

Python has three string formatting options:

  • the old percent operator
  • the .format() string method
  • f-strings_ (only since python 3.6+)

Although f-strings are more ergonomic, there a certain scenarios where the .format() method is still the only viable option.

See pyformat website_ for examples of the percent operator vs the format() method.

For a more format definition see the PEP 3101_.

This plugin is based on a python checker that was in plone.recipe.codeanalysis_.

Install

Install with pip::

$ pip install flake8-pep3101

Requirements

  • Python 3.8, 3.9, 3.10, 3.11 and pypy3
  • flake8

Extras

If you want to check whether your new style formatting are correctly defined, check flake8-string-format_ plugin.

License

GPL 2.0

.. _pyformat website: https://pyformat.info .. _PEP 3101: https://www.python.org/dev/peps/pep-3101 .. _f-strings: https://peps.python.org/pep-0498/ .. _flake8-string-format: https://pypi.python.org/pypi/flake8-string-format .. _plone.recipe.codeanalysis: https://pypi.python.org/pypi/plone.recipe.codeanalysis

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc