Only define gethookproxy, isinitpath on Session
This fixes an issue where pylint complains about missing implementations of abstract methods in subclasses of `File` which only override `collect()` (as they should). It is also cleaner and makes sense, these methods really don't need to be overridden. The previous methods defined directly on `FSCollector` and `Package` are deprecated, to be removed in pytest 7. See commitse2934c3f8candf10ab021e2for reference.
This commit is contained in:
@@ -84,3 +84,8 @@ WARNING_CAPTURED_HOOK = PytestDeprecationWarning(
|
||||
"The pytest_warning_captured is deprecated and will be removed in a future release.\n"
|
||||
"Please use pytest_warning_recorded instead."
|
||||
)
|
||||
|
||||
FSCOLLECTOR_GETHOOKPROXY_ISINITPATH = PytestDeprecationWarning(
|
||||
"The gethookproxy() and isinitpath() methods of FSCollector and Package are deprecated; "
|
||||
"use self.session.gethookproxy() and self.session.isinitpath() instead. "
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user