bidict/setup.cfg

48 lines
1.4 KiB
INI
Raw Normal View History

2019-12-31 23:14:23 +00:00
# Copyright 2009-2020 Joshua Bronson. All Rights Reserved.
Various improvements. - Refactor proxied- (i.e. delegated-) to-``_fwdm`` logic for better composability and interoperability. Drop the ``_Proxied*`` mixin classes and instead move their methods into :class:`~bidict.BidictBase`, which now checks for an object defined by the :attr:`~bidict.BidictBase.__delegate__` attribute. The :attr:`~bidict.BidictBase.__delegate__` object will be delegated to if the method is available on it, otherwise a default implementation (e.g. inherited from :class:`~collections.abc.Mapping`) will be used otherwise. Subclasses may set ``__delegate__ = None`` to opt out. - Consolidate ``_MutableBidict`` into :class:`bidict.bidict` now that the dropped mixin classes make it unnecessary. - Change :attr:`~bidict.BidictBase.__repr_delegate__` to take simply a type like :class:`dict` or :class:`list`. - Upgrade to latest major `sortedcontainers <https://github.com/grantjenks/python-sortedcontainers>`__ version (from v1 to v2) for the :ref:`extending:Sorted Bidict Recipes`. - ``bidict.compat.{view,iter}{keys,values,items}`` on Python2 no longer assumes the target object implements these methods, as they're not actually part of the :class:`~collections.abc.Mapping` interface, and provides fallback implementations when the methods are unavailable. This allows the :ref:`extending:Sorted Bidict Recipes` to continue to work with sortedcontainers v2 on Python2. - Test code in docs via Sphinx rather than pytest. Enables running Python version-dependent tests conditionally rather than skipping them altogether, as well as hiding import statements (via `testsetup`) that otherwise just add noise. Run tests (viz. pytest and Sphinx doctest) via a new run-tests.py script.
2018-11-05 20:52:59 +00:00
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# https://wheel.readthedocs.io/en/stable/user_guide.html#building-wheels
[bdist_wheel]
universal = 1
Various improvements. - Refactor proxied- (i.e. delegated-) to-``_fwdm`` logic for better composability and interoperability. Drop the ``_Proxied*`` mixin classes and instead move their methods into :class:`~bidict.BidictBase`, which now checks for an object defined by the :attr:`~bidict.BidictBase.__delegate__` attribute. The :attr:`~bidict.BidictBase.__delegate__` object will be delegated to if the method is available on it, otherwise a default implementation (e.g. inherited from :class:`~collections.abc.Mapping`) will be used otherwise. Subclasses may set ``__delegate__ = None`` to opt out. - Consolidate ``_MutableBidict`` into :class:`bidict.bidict` now that the dropped mixin classes make it unnecessary. - Change :attr:`~bidict.BidictBase.__repr_delegate__` to take simply a type like :class:`dict` or :class:`list`. - Upgrade to latest major `sortedcontainers <https://github.com/grantjenks/python-sortedcontainers>`__ version (from v1 to v2) for the :ref:`extending:Sorted Bidict Recipes`. - ``bidict.compat.{view,iter}{keys,values,items}`` on Python2 no longer assumes the target object implements these methods, as they're not actually part of the :class:`~collections.abc.Mapping` interface, and provides fallback implementations when the methods are unavailable. This allows the :ref:`extending:Sorted Bidict Recipes` to continue to work with sortedcontainers v2 on Python2. - Test code in docs via Sphinx rather than pytest. Enables running Python version-dependent tests conditionally rather than skipping them altogether, as well as hiding import statements (via `testsetup`) that otherwise just add noise. Run tests (viz. pytest and Sphinx doctest) via a new run-tests.py script.
2018-11-05 20:52:59 +00:00
# http://flake8.pycqa.org/en/latest/user/configuration.html
[flake8]
exclude =
__pycache__,
.git,
.tox
bidict/_version.py,
docs/conf.py,
2019-11-04 02:54:52 +00:00
ignore =
E265, # block comment should start with '# '
E266, # too many leading '#' for block comment
E301, # expected 1 blank line, found 0 (prevents idiomatic type hints)
E302, # expected 2 blank lines, found 0 (prevents idiomatic type hints)
E402, # import not at top of file
E501, # line too long
E704, # more than one statement on a single line (prevents idiomatic type hints)
E722, # broad except
F811, # redefinition of unused ... (prevents idiomatic type hints)
Various improvements. - Refactor proxied- (i.e. delegated-) to-``_fwdm`` logic for better composability and interoperability. Drop the ``_Proxied*`` mixin classes and instead move their methods into :class:`~bidict.BidictBase`, which now checks for an object defined by the :attr:`~bidict.BidictBase.__delegate__` attribute. The :attr:`~bidict.BidictBase.__delegate__` object will be delegated to if the method is available on it, otherwise a default implementation (e.g. inherited from :class:`~collections.abc.Mapping`) will be used otherwise. Subclasses may set ``__delegate__ = None`` to opt out. - Consolidate ``_MutableBidict`` into :class:`bidict.bidict` now that the dropped mixin classes make it unnecessary. - Change :attr:`~bidict.BidictBase.__repr_delegate__` to take simply a type like :class:`dict` or :class:`list`. - Upgrade to latest major `sortedcontainers <https://github.com/grantjenks/python-sortedcontainers>`__ version (from v1 to v2) for the :ref:`extending:Sorted Bidict Recipes`. - ``bidict.compat.{view,iter}{keys,values,items}`` on Python2 no longer assumes the target object implements these methods, as they're not actually part of the :class:`~collections.abc.Mapping` interface, and provides fallback implementations when the methods are unavailable. This allows the :ref:`extending:Sorted Bidict Recipes` to continue to work with sortedcontainers v2 on Python2. - Test code in docs via Sphinx rather than pytest. Enables running Python version-dependent tests conditionally rather than skipping them altogether, as well as hiding import statements (via `testsetup`) that otherwise just add noise. Run tests (viz. pytest and Sphinx doctest) via a new run-tests.py script.
2018-11-05 20:52:59 +00:00
# https://pydocstyle.readthedocs.io/en/latest/snippets/config.html
[pydocstyle]
add_ignore =
D102, # missing docstring in public method (prevents idiomatic type hints)
D103, # missing docstring in public function (prevents idiomatic type hints)
D107, # missing docstring in __init__ (prevents idiomatic type hints)
D105,
D205,
D400,
D401,
D402
2018-04-07 05:22:36 +00:00
Various improvements. - Refactor proxied- (i.e. delegated-) to-``_fwdm`` logic for better composability and interoperability. Drop the ``_Proxied*`` mixin classes and instead move their methods into :class:`~bidict.BidictBase`, which now checks for an object defined by the :attr:`~bidict.BidictBase.__delegate__` attribute. The :attr:`~bidict.BidictBase.__delegate__` object will be delegated to if the method is available on it, otherwise a default implementation (e.g. inherited from :class:`~collections.abc.Mapping`) will be used otherwise. Subclasses may set ``__delegate__ = None`` to opt out. - Consolidate ``_MutableBidict`` into :class:`bidict.bidict` now that the dropped mixin classes make it unnecessary. - Change :attr:`~bidict.BidictBase.__repr_delegate__` to take simply a type like :class:`dict` or :class:`list`. - Upgrade to latest major `sortedcontainers <https://github.com/grantjenks/python-sortedcontainers>`__ version (from v1 to v2) for the :ref:`extending:Sorted Bidict Recipes`. - ``bidict.compat.{view,iter}{keys,values,items}`` on Python2 no longer assumes the target object implements these methods, as they're not actually part of the :class:`~collections.abc.Mapping` interface, and provides fallback implementations when the methods are unavailable. This allows the :ref:`extending:Sorted Bidict Recipes` to continue to work with sortedcontainers v2 on Python2. - Test code in docs via Sphinx rather than pytest. Enables running Python version-dependent tests conditionally rather than skipping them altogether, as well as hiding import statements (via `testsetup`) that otherwise just add noise. Run tests (viz. pytest and Sphinx doctest) via a new run-tests.py script.
2018-11-05 20:52:59 +00:00
2018-04-07 05:22:36 +00:00
# pylint config is in .pylintrc