Repository URL to install this package:
|
Version:
1.0.9-1 ▾
|
wlanpi-profiler
/
opt
/
wlanpi-profiler
/
lib
/
python3.7
/
site-packages
/
__pycache__
/
zipp.cpython-37.pyc
|
|---|
B
·¯i|¨ã @ s´ d dl Z d dlZd dlZd dlZd dlZd dlZd dlZejdk rPd dlm Z ne
Z dgZdd Zdd Z
e jZd d
ZG dd dejZG d
d deZdd ZG dd dZdS )é N)é é )ÚOrderedDictÚPathc C s t t| dd¡S )a2
Given a path with elements separated by
posixpath.sep, generate all parents of that path.
>>> list(_parents('b/d'))
['b']
>>> list(_parents('/b/d/'))
['/b']
>>> list(_parents('b/d/f/'))
['b/d', 'b']
>>> list(_parents('b'))
[]
>>> list(_parents(''))
[]
é N)Ú itertoolsÚisliceÚ _ancestry)Úpath© r ú/build/wlanpi-profiler-8o1rr4/wlanpi-profiler-1.0.9/debian/wlanpi-profiler/opt/wlanpi-profiler/lib/python3.7/site-packages/zipp.pyÚ_parents s r
c c s8 | tj¡} x&| r2| tjkr2| V t | ¡\} }qW dS )aR
Given a path with elements separated by
posixpath.sep, generate all elements of that path
>>> list(_ancestry('b/d'))
['b/d', 'b']
>>> list(_ancestry('/b/d/'))
['/b/d', '/b']
>>> list(_ancestry('b/d/f/'))
['b/d/f', 'b/d', 'b']
>>> list(_ancestry('b'))
['b']
>>> list(_ancestry(''))
[]
N)ÚrstripÚ posixpathÚsepÚsplit)r
Útailr r r r % s r c C s t t|j| ¡S )zZ
Return items in minuend not in subtrahend, retaining order
with O(1) lookup.
)r ÚfilterfalseÚsetÚ__contains__)ZminuendZ
subtrahendr r r Ú_difference? s r c sH e Zd ZdZedd Z fddZdd Zdd Ze d
d Z
ZS )ÚCompleteDirszk
A ZipFile subclass that ensures that implied directories
are always included in the namelist.
c C s. t j tt| ¡}dd |D }tt|| S )Nc s s | ]}|t j V qd S )N)r r )Ú.0Úpr r r ú <genexpr>P s z-CompleteDirs._implied_dirs.<locals>.<genexpr>)r ÚchainÚ
from_iterableÚmapr
Ú_deduper )ÚnamesÚparentsZas_dirsr r r Ú
_implied_dirsM s zCompleteDirs._implied_dirsc s t t| ¡ }|t| |¡ S )N)Úsuperr ÚnamelistÚlistr! )Úselfr )Ú __class__r r r# S s zCompleteDirs.namelistc C s t | ¡ S )N)r r# )r% r r r Ú _name_setW s zCompleteDirs._name_setc C s, | ¡ }|d }||ko||k}|r(|S |S )zx
If the name represents a directory, return that name
as a directory (with the trailing slash).
ú/)r' )r% Únamer ÚdirnameZ dir_matchr r r Úresolve_dirZ s zCompleteDirs.resolve_dirc C s>