Skip to content

Docs/pylint vscode #443

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

Open
wants to merge 3 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
6 changes: 3 additions & 3 deletions docs/guides/vscode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ Setup
3. In the ``.vscode`` directory create a file called ``settings.json``
4. In that file copy and paste all of these json settings:

.. code::
.. code::

{
"python.linting.pylintArgs": [
"--disable", "E0102",
"pylint.args": [
"--disable", "E0102",
"--disable", "C0111",
"--disable", "W0401",
"--disable", "C0304",
Expand Down
5 changes: 2 additions & 3 deletions p5/core/primitives.py
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ def rect(*args, mode: Optional[str] = None):
:param args: For modes'CORNER' or 'CENTER' this has the form
(width, height); for the 'RADIUS' this has the form
(half_width, half_height); and for the 'CORNERS' mode, args
should be the corner opposite to `coordinate`.
should be two int values x, y - the coords of corner opposite to `coordinate`.

:type: tuple

Expand Down Expand Up @@ -602,8 +602,7 @@ def rect(*args, mode: Optional[str] = None):
height = 2 * half_height
elif mode == "CORNERS":
corner = Point(*coordinate)
(corner_2,) = args
corner_2 = Point(*corner_2)
corner_2 = Point(*args)
width = corner_2.x - corner.x
height = corner_2.y - corner.y
else:
Expand Down