Astroid hook for the Hypothesis library.
Without this hook pylint reports no-value-for-parameter for use of strategies
defined using the @hypothesis.strategies.composite
decorator. For example:
from hypothesis import strategies as st
@st.composite def a_strategy(draw):
return draw(st.integers())a_strategy()
Function | is_decorated_with_st_composite |
Return True if a decorated node has @st.composite applied. |
Function | remove_draw_parameter_from_composite_strategy |
Given that the FunctionDef is decorated with @st.composite, remove the first argument (draw ) - it's always supplied by Hypothesis so we don't need to emit the no-value-for-parameter lint. |
Constant | COMPOSITE_NAMES |
Undocumented |
draw
) - it's always supplied by Hypothesis so we don't
need to emit the no-value-for-parameter lint.