mirror of
https://github.com/pybricks/pybricks-api.git
synced 2026-09-12 01:24:17 +00:00
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:
Vendored
+4
@@ -1,4 +1,8 @@
|
||||
{
|
||||
"files.exclude": {
|
||||
"**/__pycache__": true,
|
||||
},
|
||||
|
||||
"python.autoComplete.extraPaths": ["jedi/src"],
|
||||
"python.formatting.provider": "black",
|
||||
"python.linting.pylintEnabled": false,
|
||||
|
||||
@@ -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/
|
||||
|
||||
@@ -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."""
|
||||
|
||||
|
||||
@@ -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__"
|
||||
|
||||
Reference in New Issue
Block a user