Skip to content

Commit

Permalink
Remove repeated specification of base banner class
Browse files Browse the repository at this point in the history
  • Loading branch information
pradyunsg committed Jan 30, 2023
1 parent 9f56b6a commit a287533
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class PEPBanner(rst.Directive):
admonition_post_text = ""

admonition_class = nodes.important
css_classes = ["pep-banner"]
css_classes = []


def run(self) -> list[nodes.admonition]:
Expand All @@ -48,7 +48,7 @@ def run(self) -> list[nodes.admonition]:

source_lines = [pre_text] + list(self.content or []) + [post_text]
admonition_node = self.admonition_class(
"\n".join(source_lines), classes=self.css_classes)
"\n".join(source_lines), classes=["pep-banner"] + self.css_classes)

admonition_node.append(pre_text_node)
if self.content:
Expand All @@ -75,7 +75,7 @@ class CanonicalDocBanner(PEPBanner):
"See :pep:`1` for how to propose changes."
)

css_classes = [*PEPBanner.css_classes, "canonical-doc"]
css_classes = ["canonical-doc"]



Expand All @@ -98,4 +98,4 @@ class CanonicalPyPASpecBanner(PEPBanner):
"for how to propose changes."
)

css_classes = [*PEPBanner.css_classes, "canonical-pypa-spec"]
css_classes = ["canonical-pypa-spec"]

0 comments on commit a287533

Please sign in to comment.