Skip to content

Commit c54ff7c

Browse files
committed
improve comments
1 parent ad98351 commit c54ff7c

File tree

4 files changed

+17
-26
lines changed

4 files changed

+17
-26
lines changed

doc/conf.py

-13
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,3 @@
1-
# -*- coding: utf-8 -*-
2-
#
3-
# sphinxcontrib-rubydomain-acceptancetest documentation build configuration file, created by
4-
# sphinx-quickstart on Sun Apr 25 13:27:18 2010.
5-
#
6-
# This file is execfile()d with the current directory set to its containing dir.
7-
#
8-
# Note that not all possible configuration values are present in this
9-
# autogenerated file.
10-
#
11-
# All configuration values have a default; values that are commented out
12-
# serve to show the default.
13-
141
import sys, os
152

163
# If extensions (or modules to document with autodoc) are in another directory,

setup.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
import os
32
from setuptools import setup, find_packages
43

sphinxcontrib/__init__.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# -*- coding: utf-8 -*-
21
"""
32
sphinxcontrib
43
~~~~~~~~~~~~~

sphinxcontrib/phpdomain.py

+17-11
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
# -*- coding: utf-8 -*-
21
"""
3-
sphinx.domains.php
4-
~~~~~~~~~~~~~~~~~~~
2+
Sphinx PHP domain.
53
6-
The PHP domain. Based off of the rubydomain by SHIBUKAWA Yoshiki
7-
8-
:copyright: Copyright 2017 by Mark Story
4+
:copyright: Copyright 2023 by Mark Story
95
:license: BSD, see LICENSE for details.
106
"""
117
import re
@@ -24,27 +20,34 @@
2420
from sphinx.util.docfields import Field, GroupedField, TypedField
2521
from sphinx import __version__ as sphinx_version
2622

27-
# log informative messages
2823
def log_info(
2924
fromdocnode,
3025
message: str
3126
):
27+
"""
28+
Log informative message. Should have no affect on exit code.
29+
"""
3230
logger = logging.getLogger(__name__)
3331
logger.info(f"[phpdomain.info] {message}", location=fromdocnode)
3432

35-
# log messages that should fail CI
3633
def log_warning(
3734
fromdocnode,
3835
message: str
3936
):
37+
"""
38+
Log warning. Should set exit code to non-zero.
39+
"""
4040
logger = logging.getLogger(__name__)
4141
logger.warning(f"[phpdomain.warning] {message}", location=fromdocnode)
4242

43-
# log assertions that should fail CI
43+
#
4444
def log_assert(
4545
fromdocnode,
4646
value: bool
4747
):
48+
"""
49+
Log assertion. Should set exit code to non-zero.
50+
"""
4851
if not value:
4952
caller = inspect.getframeinfo(inspect.stack()[1][0])
5053
logger = logging.getLogger(__name__)
@@ -87,7 +90,8 @@ def log_assert(
8790

8891
def _pseudo_parse_arglist(signode, arglist):
8992
# type: (addnodes.desc_signature, unicode) -> None
90-
""""Parse" a list of arguments separated by commas.
93+
"""
94+
"Parse" a list of arguments separated by commas.
9195
Arguments can have "optional" annotations given by enclosing them in
9296
brackets. Currently, this will split at any comma, even if it's inside a
9397
string literal (e.g. default argument value).
@@ -640,7 +644,9 @@ def generate(self, docnames=None):
640644

641645

642646
class PhpDomain(Domain):
643-
"""PHP language domain."""
647+
"""
648+
PHP language domain.
649+
"""
644650
name = 'php'
645651
label = 'PHP'
646652
object_types = {

0 commit comments

Comments
 (0)