setup.cfg 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. [tool:pytest]
  2. addopts = --typeguard-packages=radicale
  3. [tox:tox]
  4. min_version = 4.0
  5. envlist = py, flake8, isort, mypy
  6. [testenv]
  7. extras =
  8. test
  9. deps =
  10. pytest
  11. pytest-cov
  12. commands = pytest -r s --cov --cov-report=term --cov-report=xml .
  13. [testenv:flake8]
  14. deps = flake8==7.1.0
  15. commands = flake8 .
  16. skip_install = True
  17. [testenv:isort]
  18. deps = isort==5.13.2
  19. commands = isort --check --diff .
  20. skip_install = True
  21. [testenv:mypy]
  22. deps = mypy==1.11.0
  23. commands = mypy .
  24. skip_install = True
  25. [tool:isort]
  26. 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
  27. known_third_party = defusedxml,passlib,pkg_resources,pytest,vobject
  28. [flake8]
  29. # Only enable default tests (https://github.com/PyCQA/flake8/issues/790#issuecomment-812823398)
  30. # DNE: DOES-NOT-EXIST
  31. select = E,F,W,C90,DNE000
  32. ignore = E121,E123,E126,E226,E24,E704,W503,W504,DNE000,E501
  33. extend-exclude = build
  34. [mypy]
  35. ignore_missing_imports = True
  36. show_error_codes = True
  37. exclude = (^|/)build($|/)
  38. [coverage:run]
  39. branch = True
  40. source = radicale
  41. omit = tests/*,*/tests/*
  42. [coverage:report]
  43. # Regexes for lines to exclude from consideration
  44. exclude_lines =
  45. # Have to re-enable the standard pragma
  46. pragma: no cover
  47. # Don't complain if tests don't hit defensive assertion code:
  48. raise AssertionError
  49. raise NotImplementedError
  50. # Don't complain if non-runnable code isn't run:
  51. if __name__ == .__main__.: