Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 1086 Create pull-requests to python-anti-patterns with links to our docs #160

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ <h2>Best practice<a class="headerlink" href="#best-practice" title="Permalink to
<div class="section" id="references">
<h2>References<a class="headerlink" href="#references" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><p>PyLint - W0212, protected-access</p></li>
<li><p><a class="reference external" href="https://pylint.readthedocs.io/en/latest/user_guide/messages/warning/protected-access.html">PyLint - W0212, protected-access</a></p></li>
</ul>
</div>
</div>
Expand Down Expand Up @@ -241,4 +241,4 @@ <h2>References<a class="headerlink" href="#references" title="Permalink to this
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>

</body>
</html>
</html>
4 changes: 2 additions & 2 deletions docs/correctness/bad_except_clauses_order.html
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ <h3>Move sub class exception clause before its ancestor’s clause<a class="head
<div class="section" id="references">
<h2>References<a class="headerlink" href="#references" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><p>Pylint - E0701, bad-except-order</p></li>
<li><p><a class="reference external" href="https://pylint.readthedocs.io/en/latest/user_guide/messages/error/bad-except-order.html">Pylint - E0701, bad-except-order</a></p></li>
</ul>
</div>
</div>
Expand Down Expand Up @@ -244,4 +244,4 @@ <h2>References<a class="headerlink" href="#references" title="Permalink to this
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>

</body>
</html>
</html>
4 changes: 2 additions & 2 deletions docs/correctness/bad_first_argument_given_to_super.html
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ <h2>References<a class="headerlink" href="#references" title="Permalink to this
<li><p><a class="reference external" href="https://docs.python.org/3.1/library/functions.html#super">Python Standard Library - super([type[, object-or-type]])</a></p></li>
<li><p><a class="reference external" href="http://stackoverflow.com/questions/1173992/what-is-a-basic-example-of-single-inheritance-using-the-super-keyword-in-pytho">Stack Overflow - What is a basic example of single inheritance using super()?</a></p></li>
<li><p><a class="reference external" href="http://stackoverflow.com/questions/15896265/python-super-inheritance-and-arguments-needed">Stack Overflow - Python super() inheritance and arguments needed</a></p></li>
<li><p>PyLint - E1003, bad-super-call</p></li>
<li><p><a class="reference external" href="https://pylint.readthedocs.io/en/latest/user_guide/messages/error/bad-super-call.html">PyLint - E1003, bad-super-call</a></p></li>
<li><p><a class="reference external" href="https://www.python.org/dev/peps/pep-3135/">PEP 3135 - New Super</a></p></li>
</ul>
</div>
Expand Down Expand Up @@ -284,4 +284,4 @@ <h2>References<a class="headerlink" href="#references" title="Permalink to this
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>

</body>
</html>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ <h3>Insert a <code class="docutils literal notranslate"><span class="pre">break<
<div class="section" id="references">
<h2>References<a class="headerlink" href="#references" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><p>PyLint - W0120, useless-else-on-loop</p></li>
<li><p><a class="reference external" href="https://pylint.readthedocs.io/en/latest/user_guide/messages/warning/useless-else-on-loop.html">PyLint - W0120, useless-else-on-loop</a></p></li>
<li><p><a class="reference external" href="https://docs.python.org/2/tutorial/controlflow.html#break-and-continue-statements-and-else-clauses-on-loops">Python Standard Library - else Clauses on Loops</a></p></li>
</ul>
</div>
Expand Down Expand Up @@ -253,4 +253,4 @@ <h2>References<a class="headerlink" href="#references" title="Permalink to this
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>

</body>
</html>
</html>
4 changes: 2 additions & 2 deletions docs/correctness/exit_must_accept_three_arguments.html
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ <h2>Best practices<a class="headerlink" href="#best-practices" title="Permalink
<div class="section" id="references">
<h2>References<a class="headerlink" href="#references" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><p>PyLint - E0235,unexpected-special-method-signature</p></li>
<li><p><a class="reference external" href="https://pylint.readthedocs.io/en/latest/user_guide/messages/error/unexpected-special-method-signature.html">PyLint - E0235,unexpected-special-method-signature</a></p></li>
<li><p><a class="reference external" href="https://docs.python.org/2/reference/compound_stmts.html#with">Python Language Reference - The with statement</a></p></li>
<li><p><a class="reference external" href="https://docs.python.org/2/reference/datamodel.html#with-statement-context-managers">Python Language Reference - With Statement Context Managers</a></p></li>
<li><p><a class="reference external" href="http://stackoverflow.com/a/14776885/1669860">Stack Overflow - Python with…as</a></p></li>
Expand Down Expand Up @@ -293,4 +293,4 @@ <h2>References<a class="headerlink" href="#references" title="Permalink to this
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>

</body>
</html>
</html>
3 changes: 2 additions & 1 deletion docs/correctness/explicit_return_in_init.html
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ <h3>Move the program logic to another instance method<a class="headerlink" href=
<h2>References<a class="headerlink" href="#references" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><p>PyLint - E0101, return-in-init</p></li>
<li><p><a class="reference external" href="https://pylint.readthedocs.io/en/latest/user_guide/messages/error/return-in-init.html">PyLint - E0101, return-in-init</a></p></li>
<li><p><a class="reference external" href="https://docs.python.org/2/reference/datamodel.html#object.__init__">Python Language Reference - object.__init__(self[, …])</a></p></li>
</ul>
</div>
Expand Down Expand Up @@ -262,4 +263,4 @@ <h2>References<a class="headerlink" href="#references" title="Permalink to this
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>

</body>
</html>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ <h3>Place <code class="docutils literal notranslate"><span class="pre">__future_
<div class="section" id="references">
<h2>References<a class="headerlink" href="#references" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><p>PyLint - W0410, misplaced-future</p></li>
<li><p><a class="reference external" href="https://pylint.readthedocs.io/en/latest/user_guide/messages/warning/misplaced-future.html">PyLint - W0410, misplaced-future</a></p></li>
<li><p><a class="reference external" href="http://simeonvisser.com/posts/how-does-from-future-import-work-in-python.html">Simeon Visser - How does ‘from __future__ import …’ work?</a></p></li>
<li><p><a class="reference external" href="https://docs.python.org/2/library/__future__.html">Python Standard Library - __future__</a></p></li>
</ul>
Expand Down Expand Up @@ -252,4 +252,4 @@ <h2>References<a class="headerlink" href="#references" title="Permalink to this
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>

</body>
</html>
</html>
4 changes: 2 additions & 2 deletions docs/correctness/method_could_be_a_function.html
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ <h3>Add the <code class="docutils literal notranslate"><span class="pre">&#64;cl
<div class="section" id="references">
<h2>References<a class="headerlink" href="#references" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><p>PyLint - R0201, no-self-use</p></li>
<li><p><a class="reference external" href="https://pylint.readthedocs.io/en/latest/user_guide/messages/refactor/old-no-self-use.html">PyLint - R0201, no-self-use</a></p></li>
</ul>
</div>
</div>
Expand Down Expand Up @@ -272,4 +272,4 @@ <h2>References<a class="headerlink" href="#references" title="Permalink to this
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>

</body>
</html>
</html>
4 changes: 2 additions & 2 deletions docs/correctness/method_has_no_argument.html
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ <h3>Add the <code class="docutils literal notranslate"><span class="pre">&#64;st
<div class="section" id="references">
<h2>References<a class="headerlink" href="#references" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><p>PyLint - E0211, no-method-argument</p></li>
<li><p><a class="reference external" href="https://pylint.readthedocs.io/en/latest/user_guide/messages/error/no-method-argument.html">PyLint - E0211, no-method-argument</a></p></li>
</ul>
</div>
</div>
Expand Down Expand Up @@ -289,4 +289,4 @@ <h2>References<a class="headerlink" href="#references" title="Permalink to this
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>

</body>
</html>
</html>
4 changes: 2 additions & 2 deletions docs/correctness/mutable_default_value_as_argument.html
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ <h3>Use a sentinel value to denote an empty list or dictionary<a class="headerli
<div class="section" id="references">
<h2>References<a class="headerlink" href="#references" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><p>PyLint - W0102, dangerous-default-value</p></li>
<li><p><a class="reference external" href="https://pylint.readthedocs.io/en/latest/user_guide/messages/warning/dangerous-default-value.html">PyLint - W0102, dangerous-default-value</a></p></li>
<li><p><a class="reference external" href="http://stackoverflow.com/questions/101268/hidden-features-of-python#113198">Stack Overflow - Hidden Features of Python</a></p></li>
</ul>
</div>
Expand Down Expand Up @@ -251,4 +251,4 @@ <h2>References<a class="headerlink" href="#references" title="Permalink to this
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>

</body>
</html>
</html>
8 changes: 4 additions & 4 deletions docs/correctness/no_exception_type_specified.html
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,9 @@ <h2>Implement user defined exceptions<a class="headerlink" href="#implement-user
<div class="section" id="references">
<h2>References<a class="headerlink" href="#references" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><p>PyLint W0702, bare-except</p></li>
<li><p><cite>Python Built-in Exceptions&lt;https://docs.python.org/2/library/exceptions.html#exceptions.BaseException&gt;</cite></p></li>
<li><p><cite>Python Errors and Exceptions&lt;https://docs.python.org/2/tutorial/errors.html&gt;</cite></p></li>
<li><p><a class="reference external" href="https://pylint.readthedocs.io/en/latest/user_guide/messages/warning/bare-except.html">PyLint W0702, bare-except</a></p></li>
<li><p><a class="reference external" href="https://docs.python.org/2/library/exceptions.html#exceptions.BaseException">Python Built-in Exceptions</a></p></li>
<li><p><a class="reference external" href="https://docs.python.org/2/tutorial/errors.html">Python Errors and Exceptions</a></p></li>
</ul>
</div>
</div>
Expand Down Expand Up @@ -283,4 +283,4 @@ <h2>References<a class="headerlink" href="#references" title="Permalink to this
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>

</body>
</html>
</html>
4 changes: 2 additions & 2 deletions docs/maintainability/using_the_global_statement.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ <h3>Encapsulate the global variables into objects<a class="headerlink" href="#en
<h2>References<a class="headerlink" href="#references" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><p><a class="reference external" href="http://c2.com/cgi/wiki?GlobalVariablesAreBad">Cunningham &amp; Cunningham, Inc. - Global Variables Are Bad</a></p></li>
<li><p>PyLint - W0603, global-statement</p></li>
<li><p><a class="reference external" href="https://pylint.readthedocs.io/en/latest/user_guide/messages/warning/global-statement.html">PyLint - W0603, global-statement</a></p></li>
</ul>
</div>
</div>
Expand Down Expand Up @@ -253,4 +253,4 @@ <h2>References<a class="headerlink" href="#references" title="Permalink to this
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>

</body>
</html>
</html>
4 changes: 2 additions & 2 deletions docs/security/use_of_exec.html
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ <h3>Refactor the code to avoid <code class="docutils literal notranslate"><span
<div class="section" id="references">
<h2>References<a class="headerlink" href="#references" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li><p>PyLint - W0122, exec-used</p></li>
<li><p><a class="reference external" href="https://pylint.readthedocs.io/en/latest/user_guide/messages/warning/exec-used.html">PyLint - W0122, exec-used</a></p></li>
<li><p><a class="reference external" href="https://docs.python.org/2/reference/simple_stmts.html#the-exec-statement">Python Language Reference - The exec statement</a></p></li>
<li><p><a class="reference external" href="http://stackoverflow.com/questions/1933451/why-should-exec-and-eval-be-avoided">Stack Overflow - Why should exec() and eval() be avoided?</a></p></li>
</ul>
Expand Down Expand Up @@ -221,4 +221,4 @@ <h2>References<a class="headerlink" href="#references" title="Permalink to this
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>

</body>
</html>
</html>