Skip to content

Commit 0d7403b

Browse files
committed
Update source docs
1 parent 27ac592 commit 0d7403b

File tree

3 files changed

+87
-24
lines changed

3 files changed

+87
-24
lines changed

tools/make/lib/lint/julia/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ endif
9898
# make lint-julia-tests-fixtures
9999
#
100100
# @example
101-
# make lint-julia-tests TESTS_FIXTURES_FILTER=.*/math/base/special/abs/.*
101+
# make lint-julia-tests-fixtures TESTS_FIXTURES_FILTER=.*/math/base/special/abs/.*
102102
#/
103103
lint-julia-tests-fixtures:
104104
ifeq ($(FAIL_FAST), true)

tools/make/lib/lint/python/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ lint-python-src: pylint-src pycodestyle-src pydocstyle-src
9494
# make lint-python-tests-fixtures
9595
#
9696
# @example
97-
# make lint-python-tests TESTS_FIXTURES_FILTER=.*/math/base/special/abs/.*
97+
# make lint-python-tests-fixtures TESTS_FIXTURES_FILTER=.*/math/base/special/abs/.*
9898
#/
9999
lint-python-tests-fixtures: pylint-tests-fixtures pycodestyle-tests-fixtures pydocstyle-tests-fixtures
100100

tools/make/lib/lint/python/pycodestyle.mk

Lines changed: 85 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,15 @@ PYCODESTYLE_FLAGS ?= \
3939

4040
# RULES #
4141

42-
# Check for pycodestyle.
42+
#/
43+
# Checks whether [pycodestyle][1] is installed.
4344
#
44-
# This target checks if pycodestyle is installed.
45-
45+
# [1]: https://github.com/PyCQA/pycodestyle
46+
#
47+
# @private
48+
# @example
49+
# make check-pycodestyle
50+
#/
4651
check-pycodestyle:
4752
ifeq (, $(shell command -v $(PYCODESTYLE) 2>/dev/null))
4853
$(QUIET) echo ''
@@ -57,10 +62,23 @@ endif
5762

5863
.PHONY: check-pycodestyle
5964

60-
# Check source code style.
65+
#/
66+
# Lints Python source code style.
6167
#
62-
# This target lints only Python source files.
63-
68+
# ## Notes
69+
#
70+
# - This rule is useful when wanting to glob for Python source files (e.g., lint all Python source files for a particular package).
71+
#
72+
# @private
73+
# @param {string} [PYTHON_SOURCES_FILTER] - file path pattern (e.g., `.*/math/base/special/abs/.*`)
74+
# @param {*} [FAST_FAIL] - flag indicating whether to stop linting upon encountering a lint error
75+
#
76+
# @example
77+
# make pycodestyle-src
78+
#
79+
# @example
80+
# make pycodestyle-src PYTHON_SOURCES_FILTER=.*/math/base/special/abs/.*
81+
#/
6482
pycodestyle-src:
6583
ifeq ($(FAIL_FAST), true)
6684
$(QUIET) $(FIND_PYTHON_SOURCES_CMD) | grep '^[\/]\|^[a-zA-Z]:[/\]' | while read -r file; do \
@@ -78,11 +96,23 @@ endif
7896

7997
.PHONY: pycodestyle-src
8098

81-
82-
# Check test fixture code style.
99+
#/
100+
# Lints Python test fixture code style.
83101
#
84-
# This target lints only Python test fixture files.
85-
102+
# ## Notes
103+
#
104+
# - This rule is useful when wanting to glob for Python test fixture files (e.g., lint all Python test fixture files for a particular package).
105+
#
106+
# @private
107+
# @param {string} [TESTS_FIXTURES_FILTER] - file path pattern (e.g., `.*/math/base/special/abs/.*`)
108+
# @param {*} [FAST_FAIL] - flag indicating whether to stop linting upon encountering a lint error
109+
#
110+
# @example
111+
# make pycodestyle-tests-fixtures
112+
#
113+
# @example
114+
# make pycodestyle-tests-fixtures TESTS_FIXTURES_FILTER=.*/math/base/special/abs/.*
115+
#/
86116
pycodestyle-tests-fixtures:
87117
ifeq ($(FAIL_FAST), true)
88118
$(QUIET) $(FIND_PYTHON_TESTS_FIXTURES_CMD) | grep '^[\/]\|^[a-zA-Z]:[/\]' | while read -r file; do \
@@ -100,11 +130,23 @@ endif
100130

101131
.PHONY: pycodestyle-tests-fixtures
102132

103-
104-
# Check example code style.
133+
#/
134+
# Lints Python examples code style.
105135
#
106-
# This target lints only Python example files.
107-
136+
# ## Notes
137+
#
138+
# - This rule is useful when wanting to glob for Python examples files (e.g., lint all Python examples files for a particular package).
139+
#
140+
# @private
141+
# @param {string} [PYTHON_EXAMPLES_FILTER] - file path pattern (e.g., `.*/math/base/special/abs/.*`)
142+
# @param {*} [FAST_FAIL] - flag indicating whether to stop linting upon encountering a lint error
143+
#
144+
# @example
145+
# make pycodestyle-examples
146+
#
147+
# @example
148+
# make pycodestyle-examples PYTHON_EXAMPLES_FILTER=.*/math/base/special/abs/.*
149+
#/
108150
pycodestyle-examples:
109151
ifeq ($(FAIL_FAST), true)
110152
$(QUIET) $(FIND_PYTHON_EXAMPLES_CMD) | grep '^[\/]\|^[a-zA-Z]:[/\]' | while read -r file; do \
@@ -122,11 +164,23 @@ endif
122164

123165
.PHONY: pycodestyle-examples
124166

125-
126-
# Check benchmark code style.
167+
#/
168+
# Lints Python benchmark code style.
127169
#
128-
# This target lints only Python benchmark files.
129-
170+
# ## Notes
171+
#
172+
# - This rule is useful when wanting to glob for Python benchmark files (e.g., lint all Python benchmark files for a particular package).
173+
#
174+
# @private
175+
# @param {string} [PYTHON_BENCHMARKS_FILTER] - file path pattern (e.g., `.*/math/base/special/abs/.*`)
176+
# @param {*} [FAST_FAIL] - flag indicating whether to stop linting upon encountering a lint error
177+
#
178+
# @example
179+
# make pycodestyle-benchmarks
180+
#
181+
# @example
182+
# make pycodestyle-benchmarks PYTHON_BENCHMARKS_FILTER=.*/math/base/special/abs/.*
183+
#/
130184
pycodestyle-benchmarks:
131185
ifeq ($(FAIL_FAST), true)
132186
$(QUIET) $(FIND_PYTHON_BENCHMARKS_CMD) | grep '^[\/]\|^[a-zA-Z]:[/\]' | while read -r file; do \
@@ -144,11 +198,20 @@ endif
144198

145199
.PHONY: pycodestyle-benchmarks
146200

147-
148-
# Check Python code style.
201+
#/
202+
# Lints code style for a specified list of Python files.
149203
#
150-
# This target lints Python files. Note that we expect `$FILES` to be a Python file list.
151-
204+
# ## Notes
205+
#
206+
# - This rule is useful when wanting to lint a list of Python files generated by some other command (e.g., a list of changed Python files obtained via `git diff`).
207+
#
208+
# @private
209+
# @param {string} FILES - list of Python file paths
210+
# @param {*} [FAST_FAIL] - flag indicating whether to stop linting upon encountering a lint error
211+
#
212+
# @example
213+
# make pycodestyle-files FILES='/foo/file.py /bar/file.py'
214+
#/
152215
pycodestyle-files:
153216
ifeq ($(FAIL_FAST), true)
154217
$(QUIET) for file in $(FILES); do \

0 commit comments

Comments
 (0)