Metadata-Version: 2.1
Name: flake8-plone-api
Version: 1.5.0
Summary: Checks for code usages that can be replaced with Plone API method calls.
Home-page: https://github.com/gforcada/flake8-plone-api
Author: Gil Forcada
Author-email: gil.gnome@gmail.com
License: GPL version 2
Keywords: pep8 flake8 python plone
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Framework :: Flake8
Classifier: Framework :: Plone
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v2 (GPLv2)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Python: >=3.7
License-File: LICENSE
Requires-Dist: flake8
Provides-Extra: test
Requires-Dist: pytest ; extra == 'test'


.. -*- coding: utf-8 -*-

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

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

Flake8 Plone API plugin
=======================
Checks for code usages that can be replaced with Plone API method calls.

`See the current replacements (on DATA variable at the bottom) <https://github.com/gforcada/flake8-plone-api/blob/master/flake8_plone_api.py>`_
and `propose new ones / fix existing ones <https://github.com/gforcada/flake8-plone-api/pulls>`_.

Install
-------
Install with pip::

    $ pip install flake8-plone-api

Requirements
------------
- Python 3.7, 3.8, 3.9, 3.10 and pypy3
- flake8

License
-------
GPL 2.0

.. -*- coding: utf-8 -*-

Changelog
=========

1.5.0 (2022-10-09)
------------------

- Pin dependencies. [gforcada]

- Test//QA with GitHub actions. [gforcada]

- Overhaul testing. [gforcada]

1.4 (2017-05-31)
----------------
- Fixed false positive "default_language" string match. (issue #17)
  [iham]

- Fix conflict between flake8-plone-hasattr and flake8-plone-api
  [iham]

1.3 (2017-05-31)
----------------
- added support for sublimetext (stdin/filename handling)
  [iham]

- Release universal wheels.
  [gforcada]

1.2 (2016-07-05)
----------------
- Fix the logic to report if a line has a replacement needed.
  Before the internal data got a parenthesis at the end there was some extra logic checking for end of line or a next character.
  But since some time ago a parenthesis was added as well,
  which made some checkers never report (namely getToolByName and probably lots more).
  [gforcada]

1.1 (2016-03-29)
----------------
- Remove ``restrictedTraverse`` as a suggestion to be replaced with get_view,
  there are way too many false positives.
  [gforcada]

1.0 (2016-03-01)
----------------
- Report which version of plone.api is needed to be able to apply
  each suggested replacement.
  [gforcada]

- Add methods from plone.api 1.5.
  [gforcada]

0.6 (2015-10-06)
----------------
- Instead of looking for catalog, look for .catalog, this
  should avoid some false positives
  [do3cc]

0.5 (2015-08-17)
----------------
- Improve testing so that physical files are no longer needed.
  [gforcada]

- Remove JSON data, use a regular python dictionary.
  [gforcada]

- Fix old approach being a substring of another method (getSite and getSiteManager).
  Fixes https://github.com/gforcada/flake8-plone-api/issues/1
  [gforcada]

- Improve test coverage.
  [gforcada]

0.4 (2015-08-16)
----------------
- Ignore ``XXX`` old usages, they are mostly a placeholder to keep the mapping
  easier.
  [gforcada]

0.3 (2015-08-16)
----------------
- I give up, collapse everything into a single file, should be easy...
  [gforcada]

0.2.post1 (2015-08-16)
----------------------
- Yet another try.
  [gforcada]

0.2.post0 (2015-08-16)
----------------------
- Still not...
  [gforcada]

0.2 (2015-08-16)
----------------
- All previous releases are broken, attempting to fix it
  (setuptools is playing with me).
  [gforcada]

0.1.post1 (2015-08-15)
----------------------
- Minor README enhancement.
  [gforcada]

0.1.post0 (2015-08-15)
----------------------
- Fix version number location.
  [gforcada]

0.1 (2015-08-15)
----------------
- Initial release
  [gforcada]

- Add buildout and other stuff.
  [gforcada]

- Add a ``mapping.json`` to add Plone API method calls to old usages data
  [gforcada]

- Add a ``mapping.py`` to convert ``mapping.json`` into a reverse mapping
  (to be used by the flake8 plugin).
  [gforcada]

- Create the flake8 plugin per se that iterates over the files and searches
  for old usages (coming from ``mapping.py``).
  [gforcada]

- Add tests and badges for travis and coveralls
  [gforcada]



