flake8: Update VSCode settings and suppress some Flake8 linting warnings.

* update VSCode settings to exclude __pycache__

* suppress some Flake8 linting warnings

* minor fix: SPHINX_BUILD env var may not be set

* decorate _PybricksEnumMeta.__dir__() with @classmethod

* flake8-ignore E501
This commit is contained in:
The Vinh Luong (Lương Thế Vinh)
2022-09-05 18:40:39 -05:00
committed by GitHub
parent c64458d3b9
commit dcddf15d15
4 changed files with 8 additions and 3 deletions
+4
View File
@@ -1,4 +1,8 @@
{
"files.exclude": {
"**/__pycache__": true,
},
"python.autoComplete.extraPaths": ["jedi/src"],
"python.formatting.provider": "black",
"python.linting.pylintEnabled": false,
+1 -1
View File
@@ -2,7 +2,7 @@
[flake8]
exclude = .venv/,*.pyi,jedi/
max-line-length = 88
ignore = E203,W503
ignore = E203,E501,W503
[doc8]
ignore-path = .venv/,doc/main/build/,doc/api/build/,pybricks.egg-info/,npm/
+1 -1
View File
@@ -60,7 +60,7 @@ class Matrix:
"""
@property
def T(self) -> Matrix:
def T(self) -> Matrix: # noqa: N802
"""Returns a new :class:`.Matrix` that is the transpose of the
original."""
+2 -1
View File
@@ -11,7 +11,7 @@ import os
from .geometry import Matrix as _Matrix
if TYPE_CHECKING or os.environ["SPHINX_BUILD"] == "True":
if TYPE_CHECKING or os.environ.get("SPHINX_BUILD") == "True":
Number = Union[int, float]
"""
Numbers can be represented as integers or floating point values:
@@ -36,6 +36,7 @@ if TYPE_CHECKING or os.environ["SPHINX_BUILD"] == "True":
class _PybricksEnumMeta(type(Enum)):
@classmethod
def __dir__(cls):
yield "__class__"
yield "__name__"