-
Notifications
You must be signed in to change notification settings - Fork 366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move ruff.toml, pytest.ini and setup.cfg to pyproject.toml #1734
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,6 +72,50 @@ Repository = "https://github.com/FreeOpcUa/opcua-asyncio" | |
[tool.hatch.build.targets.sdist] | ||
include = ["/asyncua"] | ||
|
||
[tool.pytest.ini_options] | ||
log_cli = false | ||
log_level = "INFO" | ||
testpaths = ["tests"] | ||
asyncio_mode = "auto" | ||
|
||
[tool.ruff] | ||
line-length = 120 | ||
line-length = 999 | ||
extend-exclude = [ | ||
"docs", | ||
"nodeset", | ||
"schemas", | ||
"*_auto.py", | ||
"event_objects.py", | ||
"standard_address_space_services.py" | ||
] | ||
target-version = "py37" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should be 3.9 now, evertyhing else is not supported by Python |
||
[tool.ruff.lint] | ||
select = ["E", "F", "G004", "W", "UP"] | ||
ignore = [ | ||
"UP032", # Use f-string instead of `format` call | ||
"UP030", # Use implicit references for positional format fields | ||
"UP027", # Replace unpacked list comprehension with a generator expression | ||
# The following can be removed once the minimum supported Python version is 3.10 | ||
# https://github.com/astral-sh/ruff/issues/5035 | ||
"UP006", # Use `list` instead of `List` for type annotation | ||
"UP007", # Use `X | Y` for type annotations | ||
] | ||
[tool.ruff.lint.per-file-ignores] | ||
"__init__.py" = ["F401", "F403"] | ||
"examples/*" = ["F841", "E402"] | ||
|
||
[tool.mypy] | ||
disable_error_code = ["misc", "arg-type", "assignment", "var-annotated"] | ||
show_error_codes = true | ||
check_untyped_defs = false | ||
mypy_path = "./stubs" | ||
[[tool.mypy.overrides]] | ||
# Autogenerated file | ||
module = "asyncua.ua.uaprotocol_auto.*" | ||
disable_error_code = "literal-required" | ||
[[tool.mypy.overrides]] | ||
module = "asyncua.client.*" | ||
check_untyped_defs = true | ||
[[tool.mypy.overrides]] | ||
module = "asynctest.*" | ||
ignore_missing_imports = true |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +0,0 @@ | ||
[flake8] | ||
max-line-length = 160 | ||
exclude = uaproto*_auto_add.py, *_auto.py, standard_address_space_services.py | ||
ignore = E501, W503, W504 | ||
per-file-ignores = | ||
__init__.py: F401, F403 | ||
examples/*: F841, E402 | ||
[pycodestyle] | ||
max-line-length = 160 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. removed the flake8 and pycodestyle config as it's replaced by ruff check. |
||
[mypy] | ||
disable_error_code = misc, arg-type, assignment, var-annotated | ||
show_error_codes = True | ||
check_untyped_defs = False | ||
mypy_path = ./stubs | ||
[mypy-asyncua.ua.uaprotocol_auto.*] | ||
# Autogenerated file | ||
disable_error_code = literal-required | ||
[mypy-asyncua.client.*] | ||
check_untyped_defs = True | ||
[mypy-asynctest.*] | ||
ignore_missing_imports = True | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this line was previously ignored since
ruff.toml
file existed.If a line length of 120 is set currently (or even 160) there is a bunch of errors. So probably if this is to be fixed, might be easier to start using
ruff format
...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very strnage I did a reformating of many things in a recent commit.
but ok I can change that later