(
			matcher: Matcher[AnyStr],
			directory_str: ty.Optional[AnyStr]
	)
Determine which separator to use.

		Because os.fsencode can return a byte array, we must allow returning a byte array,
		regardless of AnyType.
Determine which separator to use.
Determine which separator to use .
def _walk_separator(
			matcher: Matcher[AnyStr],
			directory_str: ty.Optional[AnyStr]
	) -> ty.Union[bytes, str]:
		"""
		Determine which separator to use.

		Because os.fsencode can return a byte array, we must allow returning a byte array,
		regardless of AnyType.
		"""

		if directory_str is not None:
			return utils.maybe_fsencode(os.path.sep, directory_str)
		elif matcher is not None and matcher.is_binary:
			return os.fsencode(os.path.sep)
		else:
			return os.path.sep
def _walk_separator ( matcher : Matcher [ AnyStr ] , directory_str : ty . Optional [ AnyStr ] ) -> ty . Union [ bytes , str ] : if directory_str is not None : return utils . maybe_fsencode ( os . path . sep , directory_str ) elif matcher is not None and matcher . is_binary : return os . fsencode ( os . path . sep ) else : return os . path . sep