mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-27 02:31:09 +00:00
Drop revenants from previously used linters
This commit is contained in:
@@ -35,7 +35,7 @@ def camera_vectors_from_target_position(
|
|||||||
"""
|
"""
|
||||||
camera_offset = np.array((5, 5, 5)) if offset is None else offset
|
camera_offset = np.array((5, 5, 5)) if offset is None else offset
|
||||||
camera_position = target_position + camera_offset
|
camera_position = target_position + camera_offset
|
||||||
camera_direction = unit_vector(-camera_offset) # pylint: disable=invalid-unary-operand-type
|
camera_direction = unit_vector(-camera_offset)
|
||||||
camera_right = unit_vector(np.cross(np.array([0.0, 0.0, 1.0]), camera_direction))
|
camera_right = unit_vector(np.cross(np.array([0.0, 0.0, 1.0]), camera_direction))
|
||||||
camera_up = unit_vector(np.cross(camera_direction, camera_right))
|
camera_up = unit_vector(np.cross(camera_direction, camera_right))
|
||||||
return camera_position.tolist(), camera_direction.tolist(), camera_up.tolist()
|
return camera_position.tolist(), camera_direction.tolist(), camera_up.tolist()
|
||||||
|
|||||||
@@ -96,10 +96,10 @@ class FoundationClient:
|
|||||||
webbrowser.open(f"{auth_endpoint}?{query}")
|
webbrowser.open(f"{auth_endpoint}?{query}")
|
||||||
server.timeout = 100
|
server.timeout = 100
|
||||||
server.handle_request()
|
server.handle_request()
|
||||||
if server.auth_code and server.auth_state == state: # pylint: disable=E1101
|
if server.auth_code and server.auth_state == state:
|
||||||
data = {
|
data = {
|
||||||
"grant_type": "authorization_code",
|
"grant_type": "authorization_code",
|
||||||
"code": server.auth_code, # pylint: disable=E1101 type:ignore
|
"code": server.auth_code,
|
||||||
"redirect_uri": f"http://localhost:{server.server_address[1]}/{self.redirect_subdir}",
|
"redirect_uri": f"http://localhost:{server.server_address[1]}/{self.redirect_subdir}",
|
||||||
}
|
}
|
||||||
headers = self._get_access_token_headers()
|
headers = self._get_access_token_headers()
|
||||||
|
|||||||
+1
-79
@@ -31,14 +31,6 @@ classifiers = [
|
|||||||
Source = "https://github.com/IfcOpenShell/IfcOpenShell"
|
Source = "https://github.com/IfcOpenShell/IfcOpenShell"
|
||||||
Issues = "https://github.com/IfcOpenShell/IfcOpenShell/issues"
|
Issues = "https://github.com/IfcOpenShell/IfcOpenShell/issues"
|
||||||
|
|
||||||
[tool.black]
|
|
||||||
line-length = 120
|
|
||||||
extend-exclude = "model"
|
|
||||||
|
|
||||||
[tool.isort]
|
|
||||||
profile = "black"
|
|
||||||
extend_skip_glob = ["src/bcf/*/model/*"]
|
|
||||||
|
|
||||||
[tool.coverage.paths]
|
[tool.coverage.paths]
|
||||||
source = ["src"]
|
source = ["src"]
|
||||||
|
|
||||||
@@ -60,7 +52,7 @@ exclude_lines = [
|
|||||||
[tool.tox]
|
[tool.tox]
|
||||||
legacy_tox_ini = """
|
legacy_tox_ini = """
|
||||||
[tox]
|
[tox]
|
||||||
env_list = lint, type, py3{10,11}
|
env_list = py3{10,11}
|
||||||
skip_missing_interpreters = true
|
skip_missing_interpreters = true
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
@@ -69,78 +61,8 @@ deps =
|
|||||||
pytest-cov
|
pytest-cov
|
||||||
coverage
|
coverage
|
||||||
commands = pytest --cov --cov-report=term tests
|
commands = pytest --cov --cov-report=term tests
|
||||||
|
|
||||||
[testenv:lint]
|
|
||||||
description = run linters
|
|
||||||
skip_install = true
|
|
||||||
deps =
|
|
||||||
black
|
|
||||||
isort
|
|
||||||
pylint
|
|
||||||
commands =
|
|
||||||
black {posargs:.}
|
|
||||||
isort {posargs:.}
|
|
||||||
pylint {posargs:.} --output-format=colorized
|
|
||||||
|
|
||||||
[testenv:type]
|
|
||||||
description = run type checks
|
|
||||||
deps =
|
|
||||||
mypy>=0.991
|
|
||||||
commands =
|
|
||||||
- mypy {posargs:src}
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
[tool.mypy]
|
|
||||||
check_untyped_defs = true
|
|
||||||
disallow_any_generics = true
|
|
||||||
disallow_incomplete_defs = true
|
|
||||||
disallow_subclassing_any = true
|
|
||||||
disallow_untyped_calls = true
|
|
||||||
disallow_untyped_defs = true
|
|
||||||
no_implicit_optional = true
|
|
||||||
#no_implicit_reexport = true
|
|
||||||
show_column_numbers = true
|
|
||||||
show_error_codes = true
|
|
||||||
show_error_context = true
|
|
||||||
strict_equality = true
|
|
||||||
strict_optional = true
|
|
||||||
warn_redundant_casts = true
|
|
||||||
#warn_return_any = true
|
|
||||||
warn_unreachable = true
|
|
||||||
warn_unused_configs = true
|
|
||||||
warn_unused_ignores = true
|
|
||||||
exclude= "src/bcf/v(2|3)/model"
|
|
||||||
plugins = "numpy.typing.mypy_plugin"
|
|
||||||
|
|
||||||
[[tool.mypy.overrides]]
|
|
||||||
module = "tests"
|
|
||||||
disallow_untyped_decorators = false
|
|
||||||
disallow_untyped_defs = false
|
|
||||||
|
|
||||||
[[tool.mypy.overrides]]
|
|
||||||
module = [
|
|
||||||
"pytest",
|
|
||||||
"pytest_mock",
|
|
||||||
"ifcopenshell",
|
|
||||||
"ifcopenshell.*",
|
|
||||||
]
|
|
||||||
ignore_missing_imports = true
|
|
||||||
|
|
||||||
[tool.pylint.main]
|
|
||||||
ignore = ["model"]
|
|
||||||
ignored-modules = ["bcf.v2.model", "bcf.v3.model", "xsdata"]
|
|
||||||
jobs = 0
|
|
||||||
disable="all"
|
|
||||||
enable="E" # B,B9,BLK,C,D,E,F,I,N,S,W
|
|
||||||
|
|
||||||
[tool.pylint.design]
|
|
||||||
max-args = 10
|
|
||||||
max-attributes = 10
|
|
||||||
|
|
||||||
[tool.pylint.format]
|
|
||||||
expected-line-ending-format = "LF"
|
|
||||||
max-line-length = 120
|
|
||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
extend = "../../pyproject.toml"
|
extend = "../../pyproject.toml"
|
||||||
lint.select = [
|
lint.select = [
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
black
|
|
||||||
mypy
|
|
||||||
pylint
|
|
||||||
isort
|
|
||||||
xsdata
|
|
||||||
tox==3.27.1
|
|
||||||
@@ -370,11 +370,6 @@ test-modal:
|
|||||||
test-reregister:
|
test-reregister:
|
||||||
blender --python scripts/reregister_bonsai.py
|
blender --python scripts/reregister_bonsai.py
|
||||||
|
|
||||||
.PHONY: qa
|
|
||||||
qa:
|
|
||||||
black .
|
|
||||||
pylint ./* --output-format=colorized --disable all --enable E --disable import-error
|
|
||||||
|
|
||||||
.PHONY: coverage
|
.PHONY: coverage
|
||||||
coverage:
|
coverage:
|
||||||
coverage run --source bonsai.core -m pytest -p no:pytest-blender test/core
|
coverage run --source bonsai.core -m pytest -p no:pytest-blender test/core
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ import inspect
|
|||||||
from typing import Optional
|
from typing import Optional
|
||||||
|
|
||||||
# fmt: off
|
# fmt: off
|
||||||
# pylint: skip-file
|
|
||||||
|
|
||||||
# This interface class and decorator is magic syntactic sugar to allow concise interface definitions
|
# This interface class and decorator is magic syntactic sugar to allow concise interface definitions
|
||||||
# If we didn't do this, Python is unnecessarily verbose, which I find distracting. Don't black this file :)
|
# If we didn't do this, Python is unnecessarily verbose, which I find distracting. Don't black this file :)
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
|
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# fmt: off
|
# fmt: off
|
||||||
# pylint: skip-file
|
|
||||||
|
|
||||||
import bpy
|
import bpy
|
||||||
import ifcopenshell.api
|
import ifcopenshell.api
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
|
# along with Bonsai. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# fmt: off
|
# fmt: off
|
||||||
# pylint: skip-file
|
|
||||||
|
|
||||||
from math import pi
|
from math import pi
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|||||||
@@ -80,11 +80,6 @@ test-mathutils:
|
|||||||
pytest -p no:pytest-blender test/util/test_shape_builder.py
|
pytest -p no:pytest-blender test/util/test_shape_builder.py
|
||||||
|
|
||||||
|
|
||||||
.PHONY: qa
|
|
||||||
qa:
|
|
||||||
black .
|
|
||||||
pylint ./* --output-format=colorized --disable all --enable E
|
|
||||||
|
|
||||||
.PHONY: license
|
.PHONY: license
|
||||||
license:
|
license:
|
||||||
#copyright-header --license LGPL3 --copyright-holder "Thomas Krijnen <thomas@aecgeeks.com>" --copyright-year "2022" --copyright-software "IfcOpenShell" --copyright-software-description "IFC toolkit and geometry engine" -a ./ -o ./
|
#copyright-header --license LGPL3 --copyright-holder "Thomas Krijnen <thomas@aecgeeks.com>" --copyright-year "2022" --copyright-software "IfcOpenShell" --copyright-software-description "IFC toolkit and geometry engine" -a ./ -o ./
|
||||||
|
|||||||
Reference in New Issue
Block a user