mirror of
https://github.com/PyCQA/flake8.git
synced 2026-04-09 22:34:17 +00:00
Move trie implementation out of plugins
We're going to use it for statistics, so it no longer belongs hidden in the flake8.plugins namespace.
This commit is contained in:
parent
edd84fba52
commit
2660ddd031
4 changed files with 4 additions and 4 deletions
|
|
@ -69,7 +69,7 @@ notified.
|
||||||
To implement this goal, we needed an object to store listeners in that would
|
To implement this goal, we needed an object to store listeners in that would
|
||||||
allow for efficient look up - a Trie (or Prefix Tree). Given that none of the
|
allow for efficient look up - a Trie (or Prefix Tree). Given that none of the
|
||||||
existing packages on PyPI allowed for storing data on each node of the trie,
|
existing packages on PyPI allowed for storing data on each node of the trie,
|
||||||
it was left up to write our own as :class:`~flake8.plugins._trie.Trie`. On
|
it was left up to write our own as :class:`~flake8._trie.Trie`. On
|
||||||
top of that we layer our :class:`~flake8.plugins.notifier.Notifier` class.
|
top of that we layer our :class:`~flake8.plugins.notifier.Notifier` class.
|
||||||
|
|
||||||
Now when |Flake8| receives an error or warning, we can easily call the
|
Now when |Flake8| receives an error or warning, we can easily call the
|
||||||
|
|
@ -122,7 +122,7 @@ API Documentation
|
||||||
|
|
||||||
.. autoclass:: flake8.plugins.notifier.Notifier
|
.. autoclass:: flake8.plugins.notifier.Notifier
|
||||||
|
|
||||||
.. autoclass:: flake8.plugins._trie.Trie
|
.. autoclass:: flake8._trie.Trie
|
||||||
|
|
||||||
.. |PluginManager| replace:: :class:`~flake8.plugins.manager.PluginManager`
|
.. |PluginManager| replace:: :class:`~flake8.plugins.manager.PluginManager`
|
||||||
.. |Plugin| replace:: :class:`~flake8.plugins.manager.Plugin`
|
.. |Plugin| replace:: :class:`~flake8.plugins.manager.Plugin`
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
"""Implementation of the class that registers and notifies listeners."""
|
"""Implementation of the class that registers and notifies listeners."""
|
||||||
from flake8.plugins import _trie
|
from flake8 import _trie
|
||||||
|
|
||||||
|
|
||||||
class Notifier(object):
|
class Notifier(object):
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
"""Unit test for the _trie module."""
|
"""Unit test for the _trie module."""
|
||||||
from flake8.plugins import _trie as trie
|
from flake8 import _trie as trie
|
||||||
|
|
||||||
|
|
||||||
class TestTrie(object):
|
class TestTrie(object):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue