FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
ArchUnitPython/src/archunitpython/common/types.py at main · freud14/ArchUnitPython · GitHub
freud14
/
ArchUnitPython
Public
forked from
LukasNiessen/ArchUnitPython
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
ArchUnitPython
/
src
/
archunitpython
/
common
/
types.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
29 lines (19 loc) · 755 Bytes
Breadcrumbs
ArchUnitPython
/
src
/
archunitpython
/
common
/
types.py
Copy path
File metadata and controls
29 lines (19 loc) · 755 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
"""Core type definitions for pattern matching and filtering."""
from
__future__
import
annotations
import
re
from
dataclasses
import
dataclass
from
typing
import
Literal
,
Union
Pattern
=
Union
[
str
,
re
.
Pattern
[
str
]]
"""A pattern can be a glob string or a compiled regex."""
MatchTarget
=
Literal
[
"filename"
,
"path"
,
"path-no-filename"
,
"classname"
]
MatchType
=
Literal
[
"exact"
,
"partial"
]
@
dataclass
(
frozen
=
True
)
class
PatternMatchingOptions
:
"""Options controlling how a pattern is matched against file paths."""
target
:
MatchTarget
=
"path"
matching
:
MatchType
=
"partial"
@
dataclass
(
frozen
=
True
)
class
Filter
:
"""A compiled regex filter with matching options."""
regexp
:
re
.
Pattern
[
str
]
options
:
PatternMatchingOptions
Back
|
FazBrowse Home
|
New Git URL