Skip to content

Commit 5b07c23

Browse files
committed
Adding lesson05 homework
1 parent 895d49f commit 5b07c23

File tree

8 files changed

+498
-0
lines changed

8 files changed

+498
-0
lines changed
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
2+
3+
Report
4+
======
5+
67 statements analysed.
6+
7+
Statistics by type
8+
------------------
9+
10+
+---------+-------+-----------+-----------+------------+---------+
11+
|type |number |old number |difference |%documented |%badname |
12+
+=========+=======+===========+===========+============+=========+
13+
|module |1 |1 |= |100.00 |0.00 |
14+
+---------+-------+-----------+-----------+------------+---------+
15+
|class |0 |0 |= |0 |0 |
16+
+---------+-------+-----------+-----------+------------+---------+
17+
|method |0 |0 |= |0 |0 |
18+
+---------+-------+-----------+-----------+------------+---------+
19+
|function |6 |6 |= |100.00 |0.00 |
20+
+---------+-------+-----------+-----------+------------+---------+
21+
22+
23+
24+
External dependencies
25+
---------------------
26+
::
27+
28+
pymongo (database)
29+
30+
31+
32+
Raw metrics
33+
-----------
34+
35+
+----------+-------+------+---------+-----------+
36+
|type |number |% |previous |difference |
37+
+==========+=======+======+=========+===========+
38+
|code |69 |76.67 |NC |NC |
39+
+----------+-------+------+---------+-----------+
40+
|docstring |7 |7.78 |NC |NC |
41+
+----------+-------+------+---------+-----------+
42+
|comment |3 |3.33 |NC |NC |
43+
+----------+-------+------+---------+-----------+
44+
|empty |11 |12.22 |NC |NC |
45+
+----------+-------+------+---------+-----------+
46+
47+
48+
49+
Duplication
50+
-----------
51+
52+
+-------------------------+------+---------+-----------+
53+
| |now |previous |difference |
54+
+=========================+======+=========+===========+
55+
|nb duplicated lines |0 |0 |= |
56+
+-------------------------+------+---------+-----------+
57+
|percent duplicated lines |0.000 |0.000 |= |
58+
+-------------------------+------+---------+-----------+
59+
60+
61+
62+
Messages by category
63+
--------------------
64+
65+
+-----------+-------+---------+-----------+
66+
|type |number |previous |difference |
67+
+===========+=======+=========+===========+
68+
|convention |0 |0 |= |
69+
+-----------+-------+---------+-----------+
70+
|refactor |0 |0 |= |
71+
+-----------+-------+---------+-----------+
72+
|warning |0 |0 |= |
73+
+-----------+-------+---------+-----------+
74+
|error |0 |0 |= |
75+
+-----------+-------+---------+-----------+
76+
77+
78+
79+
80+
--------------------------------------------------------------------
81+
Your code has been rated at 10.00/10 (previous run: 10.00/10, +0.00)
82+
Lines changed: 236 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,236 @@
1+
[MASTER]
2+
3+
# Specify a configuration file.
4+
#rcfile=
5+
6+
# Python code to execute, usually for sys.path manipulation such as
7+
# pygtk.require().
8+
#init-hook=
9+
10+
# Profiled execution.
11+
profile=no
12+
13+
# Add <file or directory> to the black list. It should be a base name, not a
14+
# path. You may set this option multiple times.
15+
ignore=CVS
16+
17+
# Pickle collected data for later comparisons.
18+
persistent=yes
19+
20+
# List of plugins (as comma separated values of python modules names) to load,
21+
# usually to register additional checkers.
22+
load-plugins=
23+
24+
25+
[MESSAGES CONTROL]
26+
27+
# Enable the message, report, category or checker with the given id(s). You can
28+
# either give multiple identifier separated by comma (,) or put this option
29+
# multiple time.
30+
#enable=
31+
32+
# Disable the message, report, category or checker with the given id(s). You
33+
# can either give multiple identifier separated by comma (,) or put this option
34+
# multiple time.
35+
disable= too-few-public-methods, too-many-arguments
36+
37+
38+
[REPORTS]
39+
40+
# Set the output format. Available formats are text, parseable, colorized, msvs
41+
# (visual studio) and html
42+
output-format=text
43+
44+
# Include message's id in output
45+
include-ids=no
46+
47+
# Put messages in a separate file for each module / package specified on the
48+
# command line instead of printing them on stdout. Reports (if any) will be
49+
# written in a file name "pylint_global.[txt|html]".
50+
files-output=no
51+
52+
# Tells whether to display a full report or only the messages
53+
reports=yes
54+
55+
# Python expression which should return a note less than 10 (10 is the highest
56+
# note). You have access to the variables errors warning, statement which
57+
# respectively contain the number of errors / warnings messages and the total
58+
# number of statements analyzed. This is used by the global evaluation report
59+
# (R0004).
60+
evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
61+
62+
# Add a comment according to your evaluation note. This is used by the global
63+
# evaluation report (R0004).
64+
comment=no
65+
66+
67+
[VARIABLES]
68+
69+
# Tells whether we should check for unused import in __init__ files.
70+
init-import=no
71+
72+
# A regular expression matching names used for dummy variables (i.e. not used).
73+
dummy-variables-rgx=_|dummy
74+
75+
# List of additional names supposed to be defined in builtins. Remember that
76+
# you should avoid to define new builtins when possible.
77+
additional-builtins=
78+
79+
80+
[BASIC]
81+
82+
# Required attributes for module, separated by a comma
83+
required-attributes=
84+
85+
# List of builtins function names that should not be used, separated by a comma
86+
bad-functions=map,filter,apply,input
87+
88+
# Regular expression which should only match correct module names
89+
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
90+
91+
# Regular expression which should only match correct module level names
92+
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
93+
94+
# Regular expression which should only match correct class names
95+
class-rgx=[A-Z_][a-zA-Z0-9]+$
96+
97+
# Regular expression which should only match correct function names
98+
function-rgx=[a-z_][a-z0-9_]{2,30}$
99+
100+
# Regular expression which should only match correct method names
101+
method-rgx=[a-z_][a-z0-9_]{2,30}$
102+
103+
# Regular expression which should only match correct instance attribute names
104+
attr-rgx=[a-z_][a-z0-9_]{2,30}$
105+
106+
# Regular expression which should only match correct argument names
107+
argument-rgx=[a-z_][a-z0-9_]{2,30}$
108+
109+
# Regular expression which should only match correct variable names
110+
variable-rgx=[a-z_][a-z0-9_]{2,30}$
111+
112+
# Regular expression which should only match correct list comprehension /
113+
# generator expression variable names
114+
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
115+
116+
# Good variable names which should always be accepted, separated by a comma
117+
good-names=i,j,k,ex,Run,_
118+
119+
# Bad variable names which should always be refused, separated by a comma
120+
bad-names=foo,bar,baz,toto,tutu,tata
121+
122+
# Regular expression which should only match functions or classes name which do
123+
# not require a docstring
124+
no-docstring-rgx=__.*__
125+
126+
127+
[MISCELLANEOUS]
128+
129+
# List of note tags to take in consideration, separated by a comma.
130+
notes=FIXME,XXX,TODO
131+
132+
133+
[FORMAT]
134+
135+
# Maximum number of characters on a single line.
136+
max-line-length=80
137+
138+
# Maximum number of lines in a module
139+
max-module-lines=1000
140+
141+
# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1
142+
# tab).
143+
indent-string=' '
144+
145+
146+
[SIMILARITIES]
147+
148+
# Minimum lines number of a similarity.
149+
min-similarity-lines=4
150+
151+
# Ignore comments when computing similarities.
152+
ignore-comments=yes
153+
154+
# Ignore docstrings when computing similarities.
155+
ignore-docstrings=yes
156+
157+
158+
[TYPECHECK]
159+
160+
# Tells whether missing members accessed in mixin class should be ignored. A
161+
# mixin class is detected if its name ends with "mixin" (case insensitive).
162+
ignore-mixin-members=yes
163+
164+
# List of classes names for which member attributes should not be checked
165+
# (useful for classes with attributes dynamically set).
166+
ignored-classes=SQLObject
167+
168+
# When zope mode is activated, add a predefined set of Zope acquired attributes
169+
# to generated-members.
170+
zope=no
171+
172+
# List of members which are set dynamically and missed by pylint inference
173+
# system, and so shouldn't trigger E0201 when accessed.
174+
generated-members=REQUEST,acl_users,aq_parent
175+
176+
177+
[DESIGN]
178+
179+
# Maximum number of arguments for function / method
180+
max-args=5
181+
182+
# Argument names that match this expression will be ignored. Default to name
183+
# with leading underscore
184+
ignored-argument-names=_.*
185+
186+
# Maximum number of locals for function / method body
187+
max-locals=15
188+
189+
# Maximum number of return / yield for function / method body
190+
max-returns=6
191+
192+
# Maximum number of branch for function / method body
193+
max-branchs=12
194+
195+
# Maximum number of statements in function / method body
196+
max-statements=50
197+
198+
# Maximum number of parents for a class (see R0901).
199+
max-parents=7
200+
201+
# Maximum number of attributes for a class (see R0902).
202+
max-attributes=7
203+
204+
# Minimum number of public methods for a class (see R0903).
205+
min-public-methods=2
206+
207+
# Maximum number of public methods for a class (see R0904).
208+
max-public-methods=20
209+
210+
211+
[IMPORTS]
212+
213+
# Deprecated modules which should not be used, separated by a comma
214+
deprecated-modules=regsub,string,TERMIOS,Bastion,rexec
215+
216+
# Create a graph of every (i.e. internal and external) dependencies in the
217+
# given file (report RP0402 must not be disabled)
218+
import-graph=
219+
220+
# Create a graph of external dependencies in the given file (report RP0402 must
221+
# not be disabled)
222+
ext-import-graph=
223+
224+
# Create a graph of internal dependencies in the given file (report RP0402 must
225+
# not be disabled)
226+
int-import-graph=
227+
228+
229+
[CLASSES]
230+
231+
# List of interface methods to ignore, separated by a comma. This is used for
232+
# instance to not check methods defines in Zope's Interface base class.
233+
ignore-iface-methods=isImplementedBy,deferred,extends,names,namesAndDescriptions,queryDescriptionFor,getBases,getDescriptionFor,getDoc,getName,getTaggedValue,getTaggedValueTags,isEqualOrExtendedBy,setTaggedValue,isImplementedByInstancesOf,adaptWith,is_implemented_by
234+
235+
# List of method names used to declare (i.e. assign) instance attributes.
236+
defining-attr-methods=__init__,__new__,setUp
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
============================= test session starts ==============================
2+
platform darwin -- Python 3.7.2, pytest-4.3.0, py-1.7.0, pluggy-0.8.1 -- /usr/local/opt/python/bin/python3.7
3+
cachedir: .pytest_cache
4+
rootdir: /Users/adevey/class/Python220A_2019/students/aaron/lesson05/assignment, inifile:
5+
collecting ... collected 3 items
6+
7+
tests/test_database.py::test_import_data PASSED [ 33%]
8+
tests/test_database.py::test_show_available_products PASSED [ 66%]
9+
tests/test_database.py::test_show_rentals PASSED [100%]
10+
11+
=========================== 3 passed in 0.36 seconds ===========================

0 commit comments

Comments
 (0)