Skip to content
This repository was archived by the owner on Jan 19, 2025. It is now read-only.

Commit b79634d

Browse files
feat: api command should extract source code of api elements (#1111)
Closes #1106. ### Summary of Changes added an attribute `code` to functions and classes that contain the unformatted source code of the function or class ### Testing Instructions run `package-parser api -p sklearn -o ./out` and compare the output with the original file that the element contains. `package-parser annotations -a ../data/api/sklearn__api.json -u ../data/usages/sklearn_usages_counts.json -o ./out/annotations.json` can verify that no error occur if the file is loaded. Co-authored-by: Aclrian <[email protected]> Co-authored-by: Lars Reimann <[email protected]> Co-authored-by: lars-reimann <[email protected]>
1 parent 6093dcf commit b79634d

File tree

6 files changed

+10582
-4051
lines changed

6 files changed

+10582
-4051
lines changed

.pylintrc

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
[MESSAGES CONTROL]
2+
3+
# Disable the message, report, category or checker with the given id(s). You
4+
# can either give multiple identifiers separated by comma (,) or put this
5+
# option multiple times (only on the command line, not in the configuration
6+
# file where it should appear only once). You can also use "--disable=all" to
7+
# disable everything first and then re-enable specific checks. For example, if
8+
# you want to run only the similarities checker, you can use "--disable=all
9+
# --enable=similarities". If you want to run only the classes checker, but have
10+
# no Warning level messages displayed, use "--disable=all --enable=classes
11+
# --disable=W".
12+
disable=
13+
# Default generated
14+
bad-inline-option,
15+
deprecated-pragma,
16+
file-ignored,
17+
locally-disabled,
18+
raw-checker-failed,
19+
suppressed-message,
20+
useless-suppression,
21+
use-symbolic-message-instead,
22+
# Disabled in pylint repo
23+
attribute-defined-outside-init,
24+
fixme,
25+
invalid-name,
26+
missing-docstring,
27+
protected-access,
28+
too-few-public-methods,
29+
# Handled by black
30+
format,
31+
# Handled by isort
32+
wrong-import-order,
33+
# False positives
34+
import-error,
35+
# Unwanted
36+
design,
37+
metrics,
38+
logging-fstring-interpolation,
39+
too-many-nested-blocks

data/api/scikit-learn license

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
BSD 3-Clause License
2+
3+
Copyright (c) 2007-2022 The scikit-learn developers.
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
* Redistributions of source code must retain the above copyright notice, this
10+
list of conditions and the following disclaimer.
11+
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
16+
* Neither the name of the copyright holder nor the names of its
17+
contributors may be used to endorse or promote products derived from
18+
this software without specific prior written permission.
19+
20+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 commit comments

Comments
 (0)