1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
U
¡ý°dºã @s´dZddlmZddlmZddlZe d¡Zdddd    ddd    dd
œZd d d d d d d dd
œZ    ddddœZ
Gdd„deddddddddgƒƒZ dddœdd„Z e d d!d"d#ƒZ e  ¡ZdS)$zMeta related things.é)Ú annotations)Ú
namedtupleNz¤(?x)
    (?P<major>\d+)(?:\.(?P<minor>\d+))?(?:\.(?P<micro>\d+))?
    (?:(?P<type>a|b|rc)(?P<pre>\d+))?
    (?:\.post(?P<post>\d+))?
    (?:\.dev(?P<dev>\d+))?
    ÚÚaÚbÚrc)ú.devz
.dev-alphaz    .dev-betaú.dev-candidateÚalphaÚbetaÚ    candidateÚfinalz 2 - Pre-Alphaz    3 - Alphaz4 - Betaz5 - Production/Stabler
r r )rrrc
s|eZdZdZddddddddddœ‡fdd„ Zd    d
œd d „Zd    d
œd d„Zd    d
œdd„Zdd
œdd„Zdd
œdd„Z    ‡Z
S)ÚVersional
    Get the version (PEP 440).
 
    A biased approach to the PEP 440 semantic version.
 
    Provides a tuple structure which is sorted for comparisons `v1 > v2` etc.
      (major, minor, micro, release type, pre-release build, post-release build, development release build)
    Release types are named in is such a way they are comparable with ease.
    Accessors to check if a development, pre-release, or post-release build. Also provides accessor to get
    development status for setup files.
 
    How it works (currently):
 
    - You must specify a release type as either `final`, `alpha`, `beta`, or `candidate`.
    - To define a development release, you can use either `.dev`, `.dev-alpha`, `.dev-beta`, or `.dev-candidate`.
      The dot is used to ensure all development specifiers are sorted before `alpha`.
      You can specify a `dev` number for development builds, but do not have to as implicit development releases
      are allowed.
    - You must specify a `pre` value greater than zero if using a prerelease as this project (not PEP 440) does not
      allow implicit prereleases.
    - You can optionally set `post` to a value greater than zero to make the build a post release. While post releases
      are technically allowed in prereleases, it is strongly discouraged, so we are rejecting them. It should be
      noted that we do not allow `post0` even though PEP 440 does not restrict this. This project specifically
      does not allow implicit post releases.
    - It should be noted that we do not support epochs `1!` or local versions `+some-custom.version-1`.
 
    Acceptable version releases:
 
    ```
    Version(1, 0, 0, "final")                    1.0
    Version(1, 2, 0, "final")                    1.2
    Version(1, 2, 3, "final")                    1.2.3
    Version(1, 2, 0, ".dev-alpha", pre=4)        1.2a4
    Version(1, 2, 0, ".dev-beta", pre=4)         1.2b4
    Version(1, 2, 0, ".dev-candidate", pre=4)    1.2rc4
    Version(1, 2, 0, "final", post=1)            1.2.post1
    Version(1, 2, 3, ".dev")                     1.2.3.dev0
    Version(1, 2, 3, ".dev", dev=1)              1.2.3.dev1
    ```
 
    r rÚintÚstr)ÚmajorÚminorÚmicroÚreleaseÚpreÚpostÚdevÚreturnc    
sò|||||fD]}t|tƒr$|dkstdƒ‚q|tkrDtd |¡ƒ‚d|krXdkrŠnn.|dkrntdƒ‚qÔ|r|tdƒ‚qÔ|rÔtdƒ‚nJ|d    krº|d
kr¬|dkr¬td ƒ‚qÔ|rÔtdƒ‚n|rÈtd ƒ‚n |rÔtdƒ‚tt|ƒ ||||||||¡S) zValidate version info.rz6All version parts except 'release' should be integers.z!'{}' is not a valid release type.r    r z"Implicit pre-releases not allowed.z%Version is not a development release.z0Post-releases are not allowed with pre-releases.r
rz!Implicit pre-release not allowed.zVersion is not a pre-release.)Ú
isinstancerÚ
ValueErrorÚREL_MAPÚformatÚsuperrÚ__new__)    ÚclsrrrrrrrÚvalue©Ú    __class__©úId:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\soupsieve/__meta__.pyrSs,
 
 
 
 
 
 
zVersion.__new__Úbool)rcCst|jdkƒS)zIs prerelease.r)r%r©Úselfr#r#r$Ú_is_pre{szVersion._is_precCst|jdkƒS)zIs development.r
)r%rr&r#r#r$Ú_is_dev€szVersion._is_devcCst|jdkƒS)zIs post.r)r%rr&r#r#r$Ú_is_post…szVersion._is_postcCs
t|jS)zGet development status string.)Ú
DEV_STATUSrr&r#r#r$Ú_get_dev_statusŠszVersion._get_dev_statuscCs„|jdkrd |j|j¡}nd |j|j|j¡}| ¡rP|d t|j|j¡7}| ¡rh|d |j    ¡7}| 
¡r€|d |j ¡7}|S)z Get the canonical output string.rz{}.{}z{}.{}.{}z{}{}z.post{}z.dev{}) rrrrr(rrrr*rr)r)r'Úverr#r#r$Ú_get_canonicals
zVersion._get_canonical)r rrr) Ú__name__Ú
__module__Ú __qualname__Ú__doc__rr(r)r*r,r.Ú __classcell__r#r#r!r$r(s,ý"(rrrrrrrrr)r-rc    Cs t |¡}|dkr td |¡ƒ‚t| d¡ƒ}| d¡rFt| d¡ƒnd}| d¡rbt| d¡ƒnd}| d¡rŽt| d¡}t| d¡ƒ}nd    }d}| d
¡rª| d
¡nd}| d
¡rØt| d
¡ƒ}|rÒd |nd }nd}| d ¡rôt| d ¡ƒnd}t|||||||ƒS)z.Parse version into a comparable Version tuple.Nz'{}' is not a valid versionrrrrÚtyperr rz.dev-rr)ÚRE_VERÚmatchrrrÚgroupÚ PRE_REL_MAPr)    r-Úmrrrrrrrr#r#r$Ú parse_version¡s$
 
 
r:ééér )r2Ú
__future__rÚ collectionsrÚreÚcompiler5rr+r8rr:Ú__version_info__r.Ú __version__r#r#r#r$Ú<module>s:  ÿ
ø ø $y#