Skip to content

Commit

Permalink
Merge branch 'main' into 974-sphinx-8
Browse files Browse the repository at this point in the history
# Conflicts:
#	breathe/project.py
  • Loading branch information
AA-Turner committed Jul 30, 2024
2 parents b8c64e0 + caa8dc4 commit 3e97f97
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 20 deletions.
14 changes: 2 additions & 12 deletions breathe/apidoc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
"""
breathe.apidoc
~~~~~~~~~~~~~~
Expand All @@ -14,7 +13,6 @@
:copyright: Originally by Sphinx Team, C++ modifications by Tatsuyuki Ishi
:license: BSD, see LICENSE for details.
"""
from __future__ import print_function

import os
import sys
Expand All @@ -24,14 +22,6 @@

from breathe import __version__

# Account for FileNotFoundError in Python 2
# IOError is broader but will hopefully suffice
try:
FileNotFoundError
except NameError:
FileNotFoundError = IOError


# Reference: Doxygen XSD schema file, CompoundKind only
# Only what breathe supports are included
# Translates identifier to English
Expand Down Expand Up @@ -71,7 +61,7 @@ def write_file(name, text, args):
if exc.errno != errno.EEXIST:
raise
try:
with open(fname, "r") as target:
with open(fname) as target:
orig = target.read()
if orig == text:
print_info("File %s up to date, skipping." % fname, args)
Expand Down Expand Up @@ -141,7 +131,7 @@ def recurse_tree(args):

class TypeAction(argparse.Action):
def __init__(self, option_strings, dest, **kwargs):
super(TypeAction, self).__init__(option_strings, dest, **kwargs)
super().__init__(option_strings, dest, **kwargs)
self.default = TYPEDICT.keys()
self.metavar = ",".join(TYPEDICT.keys())

Expand Down
4 changes: 2 additions & 2 deletions breathe/parser/compound.py
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ def __init__(self, char=None, valueOf_=''):
# end class docCharTypeSub


class verbatimTypeSub(object):
class verbatimTypeSub:
"""
New node type. Structure is largely pillaged from other nodes in order to
match the set.
Expand Down Expand Up @@ -1200,7 +1200,7 @@ def parse(inFilename):

try:
doc = minidom.parse(inFilename)
except IOError as e:
except OSError as e:
raise FileIOError(e)
except ExpatError as e:
raise ParseError(e)
Expand Down
4 changes: 2 additions & 2 deletions breathe/parser/compoundsuper.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def getName(self):
return self.name


class _MemberSpec(object):
class _MemberSpec:
def __init__(self, name='', data_type='', container=0):
self.name = name
self.data_type = data_type
Expand Down Expand Up @@ -2632,7 +2632,7 @@ def buildChildren(self, child_, nodeName_):
value_.append(text_.nodeValue)
# We make this unicode so that our unicode renderer catch-all picks it up
# otherwise it would go through as 'str' and we'd have to pick it up too
valuestr_ = u' '
valuestr_ = ' '
obj_ = self.mixedclass_(MixedContainer.CategorySimple,
MixedContainer.TypeString, 'sp', valuestr_)
self.content_.append(obj_)
Expand Down
2 changes: 1 addition & 1 deletion breathe/parser/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class FileIOError(Exception):
def parse(inFilename):
try:
doc = minidom.parse(inFilename)
except IOError as e:
except OSError as e:
raise FileIOError(e)
except ExpatError as e:
raise ParseError(e)
Expand Down
2 changes: 1 addition & 1 deletion breathe/parser/indexsuper.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def getName(self):
return self.name


class _MemberSpec(object):
class _MemberSpec:
def __init__(self, name='', data_type='', container=0):
self.name = name
self.data_type = data_type
Expand Down
2 changes: 1 addition & 1 deletion tests/test_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def app(test_params, app_params, make_app, shared_result):
"""
args, kwargs = app_params
assert "srcdir" in kwargs
kwargs["srcdir"].makedirs(exist_ok=True)
os.makedirs(kwargs["srcdir"], exist_ok=True)
(kwargs["srcdir"] / "conf.py").write_text("")
app_ = make_app(*args, **kwargs)
yield app_
Expand Down
1 change: 0 additions & 1 deletion tests/warnings/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# -*- coding: utf-8 -*-
#
# Test Breathe Warnings documentation build configuration file, created by
# sphinx-quickstart on Thu Jun 5 18:57:21 2014.
Expand Down

0 comments on commit 3e97f97

Please sign in to comment.