Skip to content

Commit

Permalink
🔧 Remove deprecated needfilter directive (#1308)
Browse files Browse the repository at this point in the history
This has been deprecated since v0.2.0, so high time to remove the code
  • Loading branch information
chrisjsewell authored Oct 2, 2024
1 parent bfdd575 commit ac4165c
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 346 deletions.
4 changes: 2 additions & 2 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ And use it like:
Some content
.. needfilter::
.. needlist::
:filter: "filter_me" in another_option
**Result**
Expand All @@ -192,7 +192,7 @@ And use it like:

Some content

.. needfilter::
.. needlist::
:filter: "filter_me" in another_option

.. _needs_global_options:
Expand Down
2 changes: 1 addition & 1 deletion docs/filter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ If it is invalid or returns False, the related need is not taken into account fo
:tags: filter_example
:hide:

.. needfilter::
.. needlist::
:filter: "filter_example" in tags and (("B" in tags or ("spec" == type and "closed" == status)) or "test" == type)

.. _filter_string_performance:
Expand Down
13 changes: 0 additions & 13 deletions sphinx_needs/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,19 +559,6 @@ class NeedsExtractType(NeedsFilteredBaseType):
filter_arg: None | str


class _NeedsFilterType(NeedsFilteredBaseType):
"""Data to present (filtered) needs inside a list, table or diagram
.. deprecated:: 0.2.0
"""

show_tags: bool
show_status: bool
show_filters: bool
show_legend: bool
layout: Literal["list", "table", "diagram"]


class GraphvizStyleType(TypedDict, total=False):
"""Defines a graphviz style"""

Expand Down
303 changes: 0 additions & 303 deletions sphinx_needs/directives/needfilter.py

This file was deleted.

10 changes: 0 additions & 10 deletions sphinx_needs/needs.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@
NeedextractDirective,
process_needextract,
)
from sphinx_needs.directives.needfilter import (
Needfilter,
NeedfilterDirective,
process_needfilters,
)
from sphinx_needs.directives.needflow import (
NeedflowDirective,
NeedflowGraphiz,
Expand Down Expand Up @@ -126,7 +121,6 @@
NODE_TYPES: _NODE_TYPES_T = {
Needbar: process_needbar,
# Needextract: process_needextract,
Needfilter: process_needfilters,
Needlist: process_needlist,
Needtable: process_needtables,
NeedflowPlantuml: process_needflow_plantuml,
Expand Down Expand Up @@ -163,9 +157,6 @@ def setup(app: Sphinx) -> dict[str, Any]:
app.add_node(
Need, html=(html_visit, html_depart), latex=(latex_visit, latex_depart)
)
app.add_node(
Needfilter,
)
app.add_node(Needbar)
app.add_node(Needimport)
app.add_node(Needlist)
Expand All @@ -192,7 +183,6 @@ def setup(app: Sphinx) -> dict[str, Any]:

# Define directives
app.add_directive("needbar", NeedbarDirective)
app.add_directive("needfilter", NeedfilterDirective)
app.add_directive("needlist", NeedlistDirective)
app.add_directive("needtable", NeedtableDirective)
app.add_directive("needflow", NeedflowDirective)
Expand Down
Loading

0 comments on commit ac4165c

Please sign in to comment.