setup.cfg.legacy 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. [tool:pytest]
  2. [tox:tox]
  3. min_version = 4.0
  4. envlist = py, flake8, isort, mypy
  5. [testenv]
  6. extras =
  7. test
  8. deps =
  9. pytest
  10. pytest-cov
  11. commands = pytest -r s --cov --cov-report=term --cov-report=xml .
  12. [testenv:flake8]
  13. deps = flake8==7.1.0
  14. commands = flake8 .
  15. skip_install = True
  16. [testenv:isort]
  17. deps = isort==5.13.2
  18. commands = isort --check --diff .
  19. skip_install = True
  20. [testenv:mypy]
  21. deps = mypy==1.11.0
  22. commands = mypy --install-types --non-interactive .
  23. skip_install = True
  24. [tool:isort]
  25. known_standard_library = _dummy_thread,_thread,abc,aifc,argparse,array,ast,asynchat,asyncio,asyncore,atexit,audioop,base64,bdb,binascii,binhex,bisect,builtins,bz2,cProfile,calendar,cgi,cgitb,chunk,cmath,cmd,code,codecs,codeop,collections,colorsys,compileall,concurrent,configparser,contextlib,contextvars,copy,copyreg,crypt,csv,ctypes,curses,dataclasses,datetime,dbm,decimal,difflib,dis,distutils,doctest,dummy_threading,email,encodings,ensurepip,enum,errno,faulthandler,fcntl,filecmp,fileinput,fnmatch,formatter,fpectl,fractions,ftplib,functools,gc,getopt,getpass,gettext,glob,grp,gzip,hashlib,heapq,hmac,html,http,imaplib,imghdr,imp,importlib,inspect,io,ipaddress,itertools,json,keyword,lib2to3,linecache,locale,logging,lzma,macpath,mailbox,mailcap,marshal,math,mimetypes,mmap,modulefinder,msilib,msvcrt,multiprocessing,netrc,nis,nntplib,ntpath,numbers,operator,optparse,os,ossaudiodev,parser,pathlib,pdb,pickle,pickletools,pipes,pkgutil,platform,plistlib,poplib,posix,posixpath,pprint,profile,pstats,pty,pwd,py_compile,pyclbr,pydoc,queue,quopri,random,re,readline,reprlib,resource,rlcompleter,runpy,sched,secrets,select,selectors,shelve,shlex,shutil,signal,site,smtpd,smtplib,sndhdr,socket,socketserver,spwd,sqlite3,sre,sre_compile,sre_constants,sre_parse,ssl,stat,statistics,string,stringprep,struct,subprocess,sunau,symbol,symtable,sys,sysconfig,syslog,tabnanny,tarfile,telnetlib,tempfile,termios,test,textwrap,threading,time,timeit,tkinter,token,tokenize,trace,traceback,tracemalloc,tty,turtle,turtledemo,types,typing,unicodedata,unittest,urllib,uu,uuid,venv,warnings,wave,weakref,webbrowser,winreg,winsound,wsgiref,xdrlib,xml,xmlrpc,zipapp,zipfile,zipimport,zlib
  26. known_third_party = defusedxml,libpass,pkg_resources,pytest,vobject
  27. [flake8]
  28. # Only enable default tests (https://github.com/PyCQA/flake8/issues/790#issuecomment-812823398)
  29. # DNE: DOES-NOT-EXIST
  30. select = E,F,W,C90,DNE000
  31. ignore = E121,E123,E126,E226,E24,E704,W503,W504,DNE000,E501,E261
  32. exclude = .git,
  33. __pycache__,
  34. build,
  35. dist,
  36. *.egg,
  37. *.egg-info,
  38. *.eggs,
  39. *.pyc,
  40. *.pyo,
  41. *.pyd,
  42. .tox,
  43. venv,
  44. venv3,
  45. .venv,
  46. .venv3,
  47. .env,
  48. .mypy_cache,
  49. .pytest_cache
  50. extend-exclude = build
  51. [mypy]
  52. ignore_missing_imports = True
  53. show_error_codes = True
  54. exclude = (^|/)build($|/)
  55. [coverage:run]
  56. branch = True
  57. source = radicale
  58. omit = tests/*,*/tests/*
  59. [coverage:report]
  60. # Regexes for lines to exclude from consideration
  61. exclude_lines =
  62. # Have to re-enable the standard pragma
  63. pragma: no cover
  64. # Don't complain if tests don't hit defensive assertion code:
  65. raise AssertionError
  66. raise NotImplementedError
  67. # Don't complain if non-runnable code isn't run:
  68. if __name__ == .__main__.: