diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 3013edc0..33bca366 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -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 diff --git a/breathe/directives/function.py b/breathe/directives/function.py index e35d21cf..b47b531a 100644 --- a/breathe/directives/function.py +++ b/breathe/directives/function.py @@ -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}) diff --git a/breathe/renderer/sphinxrenderer.py b/breathe/renderer/sphinxrenderer.py index 978299fb..cae3a57b 100644 --- a/breathe/renderer/sphinxrenderer.py +++ b/breathe/renderer/sphinxrenderer.py @@ -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) diff --git a/documentation/source/conf.py b/documentation/source/conf.py index 29834090..9f81ce65 100644 --- a/documentation/source/conf.py +++ b/documentation/source/conf.py @@ -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 diff --git a/requirements/development.txt b/requirements/development.txt index 69363b23..c1b74992 100644 --- a/requirements/development.txt +++ b/requirements/development.txt @@ -7,4 +7,4 @@ pytest mypy>=0.900 types-docutils>=0.17.0 -black +black==22.1.0 diff --git a/tests/test_renderer.py b/tests/test_renderer.py index 2b9a5860..16889818 100644 --- a/tests/test_renderer.py +++ b/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( diff --git a/tests/warnings/source/conf.py b/tests/warnings/source/conf.py index 8c356c37..3dfc126d 100644 --- a/tests/warnings/source/conf.py +++ b/tests/warnings/source/conf.py @@ -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 @@ -209,8 +209,8 @@ ( "index", "TestBreatheWarnings.tex", - u"Test Breathe Warnings Documentation", - u"Michael Jones", + "Test Breathe Warnings Documentation", + "Michael Jones", "manual", ), ] @@ -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. @@ -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",