sjoerdk/dicomtrolley

View on GitHub
setup.cfg

Summary

Maintainability
Test Coverage
[mypy]
python_version = 3.8
warn_return_any=True
strict_optional=True
warn_no_return=True
warn_redundant_casts=True
warn_unused_ignores=True
no_implicit_reexport = True
disallow_any_generics = True

# I don't understand how __all__ makes export clearer
implicit_reexport = True

# No incremental mode
cache_dir=/dev/null

[tool:pytest]
# No pytest doctest. using sybil instead
addopts = -p no:doctest

[pydantic-mypy]
init_forbid_extra = True
init_typed = True
warn_required_dynamic_aliases = True
warn_untyped_fields = True

[flake8]
max-line-length = 79
application-import-names =
    tests
    dicomtrolley
import-order-style = pycharm
docstring-convention = numpy
max-complexity = 10
select =
    # B are bugbear checks (including the optionals)
    B
    B9
    # C are complexity checks
    C
    # D are docstring checks
    D
    E
    F
    I
    N
    W
ignore =
    # I don't agree with this bugbear. Using !r to quote is indirect and harder to read
    B907
    # B905 is not valid < python3.9. Remove this ignore once dicomtrolley drop python3.9 support
    B905
    # D1 are public documentation checks
    D1
    # D400 First line should end with a period, see D205
    D400
    # D401 First line should be in imperative mood, lots of false positives
    D401
    # D202 No blank lines allowed after function docstring, conflicts with black
    D202
    # D205 1 blank line required between summary line and description
    D205
    # E203 is not PEP8 compliant (see black formatting)
    E203
    # E501 (line lengths) will be checked with B950 instead
    E501
    # W503 is not PEP8 compliant (see black formatting)
    W503
    # N815 allow mixedCase. Matching case of MINT API url parameters is clearer then renaming
    N815
    # I want to keep very long lines in long xml templates.
    # NOTE: this exlude is also set in pre-commit-config.yaml as pre-commit seems to ignore this here
    dicomtrolley/xml_templates.py