Skip to content

Commit

Permalink
Gut deps further
Browse files Browse the repository at this point in the history
  • Loading branch information
mawildoer committed Jan 3, 2025
1 parent 6465e38 commit d6e0da7
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 185 deletions.
11 changes: 2 additions & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,14 @@ repos:
args: ["--branch", "master"]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.9
rev: v0.8.4
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format

- repo: https://github.com/PyCQA/bandit
rev: 1.7.6
hooks:
- id: bandit
args: ["-c", "pyproject.toml"]
additional_dependencies: ["bandit[toml]"]

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
rev: v1.14.1
hooks:
- id: mypy
additional_dependencies:
Expand Down
2 changes: 1 addition & 1 deletion easyeda2kicad/easyeda/easyeda_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ def extract_easyeda_data(self, ee_data: dict, ee_data_info: dict) -> EeSymbol:
),
)

if "subparts" in ee_data and ee_data["subparts"]:
if ee_data.get("subparts"):
for unit in ee_data["subparts"]:
new_ee_unit = EeSymbolUnit(
bbox=EeSymbolBbox(
Expand Down
3 changes: 1 addition & 2 deletions easyeda2kicad/easyeda/parameters_easyeda.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,7 @@ def parse_background_filling(cls, fill_color: str) -> str:


# ---------------- POLYGON ----------------
class EeSymbolPolygon(EeSymbolPolyline):
...
class EeSymbolPolygon(EeSymbolPolyline): ...


# ---------------- PATH ----------------
Expand Down
3 changes: 1 addition & 2 deletions easyeda2kicad/easyeda/svg_path_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ class SvgPathEllipticalArc(BaseModel):
end_y: float


class SvgPathClosePath(BaseModel):
...
class SvgPathClosePath(BaseModel): ...


svg_path_handlers = {
Expand Down
88 changes: 10 additions & 78 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,8 @@ dependencies = [
[project.optional-dependencies]
dev = [
"pre-commit>=3.6.0",
"ruff>=0.1.9",
"mypy>=1.8.0",
"bandit[toml]>=1.7.6",
"ruff>=0.8.4",
"mypy>=1.14.1",
]

[project.urls]
Expand All @@ -52,22 +51,6 @@ source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "easyeda2kicad/_version.py"

[tool.black]
line-length = 88
preview = true

[tool.isort]
profile = "black"
extend_skip = [".md", ".json", ".po", ".mo",".html", ".js", ".css", ".rst"]
skip_glob = ["env/*"]
known_local_folder = ["core"]
import_heading_stdlib="Global imports"
import_heading_localfolder="Local imports"

[tool.pycln]
include=".*\\.py$"
exclude="(.eggs|.git|.hg|.mypy_cache|__pycache__|.nox|.tox|.venv|.svn|buck-out|build|dist|env|)/"

# https://mypy.readthedocs.io/en/stable/config_file.html
[tool.mypy]
python_version = "3.12"
Expand All @@ -82,70 +65,11 @@ warn_return_any = false
disallow_incomplete_defs = false
no_implicit_optional = false

[tool.pylint.master]
output-format = "colorized"
extension-pkg-whitelist = [
"pydantic"
]
ignore="(.eggs|.git|.hg|.mypy_cache|__pycache__|.nox|.tox|.venv|.svn|buck-out|build|dist|env|)/"

[tool.pylint.format]
max-line-length = 88

[tool.pylint.messages_control]
disable = [
"wrong-import-order",
"method-hidden",
"too-many-lines",
"wildcard-import",
"missing-module-docstring",
"missing-class-docstring",
"missing-function-docstring",
"logging-fstring-interpolation",
]

[tool.bandit]
exclude_dirs = ["tests", "examples"]
skips = ["B101", "B113"]

[tool.hatch.envs.lint]
dependencies = [
"black>=23.0.0",
"isort>=5.12.0",
"flake8>=6.1.0",
"flake8-bugbear",
"flake8-comprehensions",
"bandit[toml]>=1.7.5",
"mypy>=1.7.0",
]

[tool.hatch.envs.lint.scripts]
style = [
"black .",
"isort .",
"flake8 .",
]
typing = "mypy --install-types --non-interactive ."
security = "bandit -r ."
all = [
"style",
"typing",
"security",
]

[tool.ruff]
line-length = 88
target-version = "py312"
fix = true
unsafe-fixes = false
extend-select = [
"B",
"C4",
"I",
"RUF",
"W",
"YTT",
]

[tool.ruff.lint]
select = [
Expand All @@ -155,6 +79,14 @@ select = [
"B",
"C4",
]
extend-select = [
"B",
"C4",
"I",
"RUF",
"W",
"YTT",
]
ignore = [
"B034",
"E501",
Expand Down
96 changes: 3 additions & 93 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d6e0da7

Please sign in to comment.