Skip to content
Snippets Groups Projects
Unverified Commit 9309ab88 authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

remove satella

parent 380eb6f5
No related branches found
No related tags found
No related merge requests found
Pipeline #61306 failed with stage
in 2 minutes and 30 seconds
# v1.8 # v2.0
* got rid of the Mako dependency * got rid of the Mako dependency
* should work on latest Pythons * should work on latest Pythons
......
Cython Cython
satella>=2.20.0
MarkupSafe>=1.1.1 MarkupSafe>=1.1.1
...@@ -4,7 +4,7 @@ name = snakehouse ...@@ -4,7 +4,7 @@ name = snakehouse
keywords = cython, extension, multiple, pyx keywords = cython, extension, multiple, pyx
version = 1.7 version = 1.7
long_description = file: README.md long_description = file: README.md
long_description-content-type = text/markdown; charset=UTF-8 long_description_content_type = text/markdown; charset=UTF-8
license_files = LICENSE license_files = LICENSE
author = Piotr Maślanka author = Piotr Maślanka
author_email = pmaslanka@smok.co author_email = pmaslanka@smok.co
......
...@@ -14,6 +14,14 @@ def _has_separator(path: str) -> bool: ...@@ -14,6 +14,14 @@ def _has_separator(path: str) -> bool:
return False return False
return any(map(lambda x: x in path, SEPARATORS)) return any(map(lambda x: x in path, SEPARATORS))
def _cond_join(prefix: tp.Optional[str], filename: str) -> str:
"""or a conditional os.path.join"""
if prefix is None:
return filename
else:
return os.path.join(prefix, filename)
def find_files(path: str, wildcard: str = r'(.*)', def find_files(path: str, wildcard: str = r'(.*)',
prefix_with: tp.Optional[str] = None, prefix_with: tp.Optional[str] = None,
...@@ -66,20 +74,11 @@ def split(path: str) -> tp.List[str]: ...@@ -66,20 +74,11 @@ def split(path: str) -> tp.List[str]:
Is is true that Is is true that
>>> os.path.join(split(a)) == a
"""
data = list(os.path.split(path))
while _has_separdef split(path: str) -> tp.List[str]:
"""
An exact reverse of os.path.join
Is is true that
>>> os.path.join(split(a)) == a >>> os.path.join(split(a)) == a
""" """
data = list(os.path.split(path)) data = list(os.path.split(path))
while _has_separator(data[0]): while _has_separator(data[0]):
data = list(os.path.split(data[0])) + data[1:] data = list(os.path.split(data[0])) + data[1:]
return dataator(data[0]):
data = list(os.path.split(data[0])) + data[1:]
return data return data
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment