rlmgrep 0.1.14__py3-none-any.whl → 0.1.16__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rlmgrep/__init__.py +1 -1
- rlmgrep/ingest.py +19 -1
- {rlmgrep-0.1.14.dist-info → rlmgrep-0.1.16.dist-info}/METADATA +1 -1
- {rlmgrep-0.1.14.dist-info → rlmgrep-0.1.16.dist-info}/RECORD +7 -7
- {rlmgrep-0.1.14.dist-info → rlmgrep-0.1.16.dist-info}/WHEEL +0 -0
- {rlmgrep-0.1.14.dist-info → rlmgrep-0.1.16.dist-info}/entry_points.txt +0 -0
- {rlmgrep-0.1.14.dist-info → rlmgrep-0.1.16.dist-info}/top_level.txt +0 -0
rlmgrep/__init__.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
__all__ = ["__version__"]
|
|
2
|
-
__version__ = "0.1.
|
|
2
|
+
__version__ = "0.1.16"
|
rlmgrep/ingest.py
CHANGED
|
@@ -204,6 +204,8 @@ def build_ignore_spec(
|
|
|
204
204
|
rel_dir = gi.parent.relative_to(root).as_posix()
|
|
205
205
|
except ValueError:
|
|
206
206
|
rel_dir = ""
|
|
207
|
+
if rel_dir in {".", ""}:
|
|
208
|
+
rel_dir = ""
|
|
207
209
|
try:
|
|
208
210
|
raw_lines = gi.read_text(encoding="utf-8", errors="ignore").splitlines()
|
|
209
211
|
except Exception:
|
|
@@ -218,16 +220,32 @@ def build_ignore_spec(
|
|
|
218
220
|
escaped = True
|
|
219
221
|
if not escaped and line.startswith("#"):
|
|
220
222
|
continue
|
|
223
|
+
|
|
221
224
|
negated = False
|
|
222
225
|
if not escaped and line.startswith("!"):
|
|
223
226
|
negated = True
|
|
224
227
|
line = line[1:]
|
|
225
228
|
if not line:
|
|
226
229
|
continue
|
|
230
|
+
|
|
231
|
+
anchored = False
|
|
227
232
|
if line.startswith("/"):
|
|
233
|
+
anchored = True
|
|
228
234
|
line = line[1:]
|
|
235
|
+
if not line:
|
|
236
|
+
continue
|
|
237
|
+
|
|
229
238
|
if rel_dir:
|
|
230
|
-
|
|
239
|
+
if anchored:
|
|
240
|
+
line = f"{rel_dir}/{line}"
|
|
241
|
+
elif "/" in line:
|
|
242
|
+
line = f"{rel_dir}/{line}"
|
|
243
|
+
else:
|
|
244
|
+
line = f"{rel_dir}/**/{line}"
|
|
245
|
+
else:
|
|
246
|
+
if anchored:
|
|
247
|
+
line = f"/{line}"
|
|
248
|
+
|
|
231
249
|
if negated:
|
|
232
250
|
line = "!" + line
|
|
233
251
|
patterns.append(line)
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
rlmgrep/__init__.py,sha256=
|
|
1
|
+
rlmgrep/__init__.py,sha256=bJX6YPY5JOkDgVGHB_OzdE80oQjB2sVUuoGFrBuXuds,49
|
|
2
2
|
rlmgrep/__main__.py,sha256=MHKZ_ae3fSLGTLUUMOx15fWdeOnJSHhq-zslRP5F5Lc,79
|
|
3
3
|
rlmgrep/cli.py,sha256=VZTfuMKXTafPtIYwzY93A_rOjUI-txLOCAZ7d5uVjdQ,22002
|
|
4
4
|
rlmgrep/config.py,sha256=u1iz-nI8dj-dZETbpIki3RQefHJEyi5oE5zE4_IR8kg,2399
|
|
5
5
|
rlmgrep/file_map.py,sha256=x2Ri1wzK8_87GUorsAV01K_nYLZcv30yIquDeTCcdEw,876
|
|
6
|
-
rlmgrep/ingest.py,sha256=
|
|
6
|
+
rlmgrep/ingest.py,sha256=AetMIjiZFD5Yz9W3QA1_Zu0bQqEcCU32-1kRy4fr1PE,12644
|
|
7
7
|
rlmgrep/interpreter.py,sha256=s_nMRxLlAU9C0JmUzUBW5NbVbuH67doVWF54K54STlA,2478
|
|
8
8
|
rlmgrep/render.py,sha256=mCTT6yuKNv7HJ46LzOyLkCbyBedCWSNd7UeubyLXcyM,3356
|
|
9
9
|
rlmgrep/rlm.py,sha256=i3rCTp8OABByF60Un5gO7265gaW4spwU0OFKIz4surg,5750
|
|
10
|
-
rlmgrep-0.1.
|
|
11
|
-
rlmgrep-0.1.
|
|
12
|
-
rlmgrep-0.1.
|
|
13
|
-
rlmgrep-0.1.
|
|
14
|
-
rlmgrep-0.1.
|
|
10
|
+
rlmgrep-0.1.16.dist-info/METADATA,sha256=GogEzHgvS_j1PO_QKr7Q3UcL-09ENHMJ9UL4XiezmqU,7969
|
|
11
|
+
rlmgrep-0.1.16.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
12
|
+
rlmgrep-0.1.16.dist-info/entry_points.txt,sha256=UV6QkEbkwBO1JJ53mm84_n35tVyOczPvOQ14ga7vrCI,45
|
|
13
|
+
rlmgrep-0.1.16.dist-info/top_level.txt,sha256=gTujSRsO58c80eN7aRH2cfe51FHxx8LJ1w1Y2YlHti0,8
|
|
14
|
+
rlmgrep-0.1.16.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|