Skip to content

Commit

Permalink
Merge branch 'main' into noindex
Browse files Browse the repository at this point in the history
  • Loading branch information
pllim committed Dec 9, 2022
2 parents db86362 + c4aa837 commit c029e0e
Show file tree
Hide file tree
Showing 8 changed files with 66 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Changes in sphinx-automodapi
0.15.0 (unreleased)
-------------------

- Fixed issue with non-ascii characters in object members when the encoding is not ``utf8`` [#153]

0.14.1 (2022-01-12)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
#language = None
language = 'en'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down
2 changes: 1 addition & 1 deletion sphinx_automodapi/automodsumm.py
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ def generate_automodsumm_docs(lines, srcfn, app=None, suffix='.rst',

new_files.append(fn)

f = open(fn, 'w')
f = open(fn, 'w', encoding='utf8')

try:

Expand Down
1 change: 1 addition & 0 deletions sphinx_automodapi/tests/cases/non_ascii/input/index.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Ceçi est un exemple qui inclus des charactères non-ASCII

.. automodapi:: sphinx_automodapi.tests.example_module.functions
.. automodapi:: sphinx_automodapi.tests.example_module.nonascii
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
NonAscii
========

.. currentmodule:: sphinx_automodapi.tests.example_module.nonascii

.. autoclass:: NonAscii
:show-inheritance:

.. rubric:: Methods Summary

.. autosummary::

~NonAscii.get_ß
~NonAscii.get_äöü

.. rubric:: Methods Documentation

.. automethod:: get_ß
.. automethod:: get_äöü
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,23 @@ Functions
.. automodsumm:: sphinx_automodapi.tests.example_module.functions
:functions-only:
:toctree: api


sphinx_automodapi.tests.example_module.nonascii Module
------------------------------------------------------

.. automodule:: sphinx_automodapi.tests.example_module.nonascii

Classes
^^^^^^^

.. automodsumm:: sphinx_automodapi.tests.example_module.nonascii
:classes-only:
:toctree: api

Class Inheritance Diagram
^^^^^^^^^^^^^^^^^^^^^^^^^

.. automod-diagram:: sphinx_automodapi.tests.example_module.nonascii
:private-bases:
:parts: 1
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,10 @@
add
subtract
multiply
.. currentmodule:: sphinx_automodapi.tests.example_module.nonascii

.. autosummary::
:toctree: api

NonAscii

15 changes: 15 additions & 0 deletions sphinx_automodapi/tests/example_module/nonascii.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
__all__ = ['NonAscii']


class NonAscii(object):
def get_äöü(self):
"""
Return a string with common umlauts like äöüß
"""
return 'äöü'

def get_ß(self):
"""
Return a string with the eszett symbol
"""
return 'ß'

0 comments on commit c029e0e

Please sign in to comment.