Closed kj-9 closed 1 year ago
recommendation for ruff rules: https://www.kurusugawa.jp/20230322-ruff/
use typehints and docstring: https://stackoverflow.com/questions/65768215/type-annotations-with-google-style-docstrings
you can omit types in docstring
also try to add: B: flake8-bugbear PL: Pylint
which errors:
prettymaps/new_api.py:127:56: B008 Do not perform function call `TransformArg` in argument defaults
prettymaps/new_api.py:163:5: PLR0913 Too many arguments to function call (8 > 5)
prettymaps/new_api.py:169:12: B006 Do not use mutable data structures for argument defaults
tests/test_presets.py:13:30: PLR2004 Magic value used in comparison, consider replacing 7 with a constant variable
Found 4 errors.
SideNote: I noticed pylance cannot inferasdict(x).values()
results for x is dataclass.
e.g. circle is defined as bool in dataclass, but inferred as Any.
also add UP
docstring linting is currently off.
turn on ruff setting but like to use type hints for typing.