Browse Source

Format all files with pinned black version

It seems to be mostly removing u's from string. Possibly due to Python
2.7 being long dead and it doing nothing much in Python 3 (as far as I
understand.)
pull/792/head
Michael Jones 7 months ago
parent
commit
59a2efb74a
  1. 4
      breathe/directives/function.py
  2. 2
      breathe/renderer/sphinxrenderer.py
  3. 4
      documentation/source/conf.py
  4. 8
      tests/test_renderer.py
  5. 14
      tests/warnings/source/conf.py

4
breathe/directives/function.py

@ -253,11 +253,11 @@ class DoxygenFunctionDirective(BaseDirective):
res = []
candSignatures = []
for entry in matches:
text_options = {"no-link": u"", "outline": u""}
text_options = {"no-link": "", "outline": ""}
# Render the matches to docutils nodes
target_handler = create_target_handler(
{"no-link": u""}, project_info, self.state.document
{"no-link": ""}, project_info, self.state.document
)
filter_ = self.filter_factory.create_outline_filter(text_options)
mask_factory = MaskFactory({"param": NoParameterNamesMask})

2
breathe/renderer/sphinxrenderer.py

@ -1681,7 +1681,7 @@ class SphinxRenderer:
text = node.text.replace("embed:rst:inline", "", 1)
else:
# Remove the first line which is "embed:rst[:leading-asterisk]"
text = "\n".join(node.text.split(u"\n")[1:])
text = "\n".join(node.text.split("\n")[1:])
# Remove starting whitespace
text = textwrap.dedent(text)

4
documentation/source/conf.py

@ -143,8 +143,8 @@ source_suffix = ".rst"
master_doc = "index"
# General information about the project.
project = u"Breathe"
copyright = u"2009-2014, Michael Jones"
project = "Breathe"
copyright = "2009-2014, Michael Jones"
# The language for content autogenerated by Sphinx. Refer to documentation

8
tests/test_renderer.py

@ -315,7 +315,7 @@ def test_render_func(app):
argsstring="(int)",
virt="non-virtual",
param=[
WrappedParam(type_=WrappedLinkedText(content_=[WrappedMixedContainer(value=u"int")]))
WrappedParam(type_=WrappedLinkedText(content_=[WrappedMixedContainer(value="int")]))
],
)
signature = find_node(render(app, member_def), "desc_signature")
@ -460,7 +460,7 @@ def test_render_variable_initializer(app):
definition="const int EOF",
type_="const int",
name="EOF",
initializer=WrappedMixedContainer(value=u"= -1"),
initializer=WrappedMixedContainer(value="= -1"),
)
signature = find_node(render(app, member_def), "desc_signature")
assert signature.astext() == "const int EOF = -1"
@ -470,7 +470,7 @@ def test_render_define_initializer(app):
member_def = WrappedMemberDef(
kind="define",
name="MAX_LENGTH",
initializer=WrappedLinkedText(content_=[WrappedMixedContainer(value=u"100")]),
initializer=WrappedLinkedText(content_=[WrappedMixedContainer(value="100")]),
)
signature_w_initializer = find_node(
render(app, member_def, show_define_initializer=True), "desc_signature"
@ -480,7 +480,7 @@ def test_render_define_initializer(app):
member_def_no_show = WrappedMemberDef(
kind="define",
name="MAX_LENGTH_NO_INITIALIZER",
initializer=WrappedLinkedText(content_=[WrappedMixedContainer(value=u"100")]),
initializer=WrappedLinkedText(content_=[WrappedMixedContainer(value="100")]),
)
signature_wo_initializer = find_node(

14
tests/warnings/source/conf.py

@ -55,8 +55,8 @@ source_suffix = ".rst"
master_doc = "index"
# General information about the project.
project = u"Test Breathe Warnings"
copyright = u"2014, Michael Jones"
project = "Test Breathe Warnings"
copyright = "2014, Michael Jones"
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
@ -209,8 +209,8 @@ latex_documents = [
(
"index",
"TestBreatheWarnings.tex",
u"Test Breathe Warnings Documentation",
u"Michael Jones",
"Test Breathe Warnings Documentation",
"Michael Jones",
"manual",
),
]
@ -241,7 +241,7 @@ latex_documents = [
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
("index", "testbreathewarnings", u"Test Breathe Warnings Documentation", [u"Michael Jones"], 1)
("index", "testbreathewarnings", "Test Breathe Warnings Documentation", ["Michael Jones"], 1)
]
# If true, show URL addresses after external links.
@ -257,8 +257,8 @@ texinfo_documents = [
(
"index",
"TestBreatheWarnings",
u"Test Breathe Warnings Documentation",
u"Michael Jones",
"Test Breathe Warnings Documentation",
"Michael Jones",
"TestBreatheWarnings",
"One line description of project.",
"Miscellaneous",

Loading…
Cancel
Save