|
| 1 | +[project] |
| 2 | +name = "solaredge-web" |
| 3 | +version = "0.0.1" |
| 4 | +license = {text = "Apache-2.0"} |
| 5 | +authors = [ |
| 6 | + { name="tronikos", email="tronikos@gmail.com" }, |
| 7 | +] |
| 8 | +description = "A python client library for SolarEdge Web" |
| 9 | +readme = "README.md" |
| 10 | +requires-python = ">=3.10" |
| 11 | +dependencies = [ |
| 12 | + "aiohttp>=3.8", |
| 13 | +] |
| 14 | + |
| 15 | +[project.urls] |
| 16 | +"Homepage" = "https://github.com/tronikos/solaredge-web" |
| 17 | +"Bug Tracker" = "https://github.com/tronikos/solaredge-web/issues" |
| 18 | + |
| 19 | +[build-system] |
| 20 | +requires = ["setuptools"] |
| 21 | +build-backend = "setuptools.build_meta" |
| 22 | + |
| 23 | +[tool.black] |
| 24 | +extend-exclude = "_pb2.py|_pb2_grpc.py" |
| 25 | + |
| 26 | +[tool.isort] |
| 27 | +profile = "black" |
| 28 | +force_sort_within_sections = true |
| 29 | +combine_as_imports = true |
| 30 | +extend_skip_glob = ["*_pb2.py", "*_pb2_grpc.py"] |
| 31 | + |
| 32 | +[tool.ruff] |
| 33 | +target-version = "py311" |
| 34 | +exclude = ["*_pb2.py", "*_pb2_grpc.py", "*.pyi"] |
| 35 | +line-length = 127 |
| 36 | + |
| 37 | +lint.select = [ |
| 38 | + "B007", # Loop control variable {name} not used within loop body |
| 39 | + "B014", # Exception handler with duplicate exception |
| 40 | + "C", # complexity |
| 41 | + "D", # docstrings |
| 42 | + "E", # pycodestyle |
| 43 | + "F", # pyflakes/autoflake |
| 44 | + "ICN001", # import concentions; {name} should be imported as {asname} |
| 45 | + "PGH004", # Use specific rule codes when using noqa |
| 46 | + "PLC0414", # Useless import alias. Import alias does not rename original package. |
| 47 | + "SIM105", # Use contextlib.suppress({exception}) instead of try-except-pass |
| 48 | + "SIM117", # Merge with-statements that use the same scope |
| 49 | + "SIM118", # Use {key} in {dict} instead of {key} in {dict}.keys() |
| 50 | + "SIM201", # Use {left} != {right} instead of not {left} == {right} |
| 51 | + "SIM212", # Use {a} if {a} else {b} instead of {b} if not {a} else {a} |
| 52 | + "SIM300", # Yoda conditions. Use 'age == 42' instead of '42 == age'. |
| 53 | + "SIM401", # Use get from dict with default instead of an if block |
| 54 | + "T20", # flake8-print |
| 55 | + "TRY004", # Prefer TypeError exception for invalid type |
| 56 | + "RUF006", # Store a reference to the return value of asyncio.create_task |
| 57 | + "UP", # pyupgrade |
| 58 | + "W", # pycodestyle |
| 59 | +] |
| 60 | + |
| 61 | +lint.ignore = [ |
| 62 | + "D203", # 1 blank line required before class docstring |
| 63 | + "D213", # Multi-line docstring summary should start at the second line |
| 64 | + # keep-runtime-annotations |
| 65 | + 'UP006', # Non PEP585 annotations |
| 66 | + 'UP007', # Non PEP604 annotations |
| 67 | +] |
| 68 | + |
| 69 | +[tool.ruff.lint.flake8-pytest-style] |
| 70 | +fixture-parentheses = false |
| 71 | + |
| 72 | +[tool.ruff.lint.per-file-ignores] |
| 73 | +# Allow for main script to write to stdout |
| 74 | +"__main__.py" = ["T201"] |
| 75 | + |
| 76 | +[tool.ruff.lint.mccabe] |
| 77 | +max-complexity = 25 |
| 78 | + |
| 79 | +[project.optional-dependencies] |
| 80 | +dev = [ |
| 81 | + "pytest>=7", |
| 82 | +] |
0 commit comments