Skip to content

Commit

Permalink
Merge pull request #792 from michaeljones/black
Browse files Browse the repository at this point in the history
Pin version of black and reformat files to match
  • Loading branch information
michaeljones authored Feb 6, 2022
2 parents 376c5a6 + 95223df commit 4f502ea
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 18 deletions.
1 change: 0 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ jobs:
run: make flake8

- name: check source code formatting
continue-on-error: true
run: make black

- name: type check the source code
Expand Down
4 changes: 2 additions & 2 deletions breathe/directives/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,11 @@ def _resolve_function(self, matches, args: Optional[cpp.ASTParametersQualifiers]
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})
Expand Down
2 changes: 1 addition & 1 deletion breathe/renderer/sphinxrenderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1681,7 +1681,7 @@ def visit_verbatim(self, node) -> List[Node]:
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)
Expand Down
4 changes: 2 additions & 2 deletions documentation/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@
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
Expand Down
2 changes: 1 addition & 1 deletion requirements/development.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ pytest
mypy>=0.900
types-docutils>=0.17.0

black
black==22.1.0
8 changes: 4 additions & 4 deletions tests/test_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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(
Expand Down
14 changes: 7 additions & 7 deletions tests/warnings/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
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
Expand Down Expand Up @@ -209,8 +209,8 @@
(
"index",
"TestBreatheWarnings.tex",
u"Test Breathe Warnings Documentation",
u"Michael Jones",
"Test Breathe Warnings Documentation",
"Michael Jones",
"manual",
),
]
Expand Down Expand Up @@ -241,7 +241,7 @@
# 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.
Expand All @@ -257,8 +257,8 @@
(
"index",
"TestBreatheWarnings",
u"Test Breathe Warnings Documentation",
u"Michael Jones",
"Test Breathe Warnings Documentation",
"Michael Jones",
"TestBreatheWarnings",
"One line description of project.",
"Miscellaneous",
Expand Down

0 comments on commit 4f502ea

Please sign in to comment.