Commit 707d066
authored
In the private pathlib ABCs, make `ReadablePath.glob('')` yield a path with
a trailing slash (if it yields anything at all). As a result, `glob()`
works similarly to `joinpath()` when given a non-magic pattern.
In the globbing implementation, we preemptively add trailing slashes to
intermediate paths if there are pattern parts remaining; this removes the
need to check for existing trailing slashes (in the removed `add_slash()`
method) at subsequent steps.
1 parent 6c67904 commit 707d066
File tree
4 files changed
+15
-30
lines changed- Lib
- pathlib
- test/test_pathlib
4 files changed
+15
-30
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
355 | | - | |
356 | | - | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | | - | |
361 | 355 | | |
362 | 356 | | |
363 | 357 | | |
| |||
389 | 383 | | |
390 | 384 | | |
391 | 385 | | |
| 386 | + | |
| 387 | + | |
392 | 388 | | |
393 | 389 | | |
394 | 390 | | |
395 | | - | |
| 391 | + | |
396 | 392 | | |
397 | 393 | | |
398 | 394 | | |
| |||
402 | 398 | | |
403 | 399 | | |
404 | 400 | | |
405 | | - | |
| 401 | + | |
406 | 402 | | |
407 | 403 | | |
| 404 | + | |
| 405 | + | |
408 | 406 | | |
409 | 407 | | |
410 | 408 | | |
411 | 409 | | |
412 | | - | |
| 410 | + | |
413 | 411 | | |
414 | 412 | | |
415 | 413 | | |
| |||
437 | 435 | | |
438 | 436 | | |
439 | 437 | | |
440 | | - | |
| 438 | + | |
441 | 439 | | |
442 | 440 | | |
443 | 441 | | |
| |||
467 | 465 | | |
468 | 466 | | |
469 | 467 | | |
470 | | - | |
471 | 468 | | |
472 | 469 | | |
473 | 470 | | |
| |||
491 | 488 | | |
492 | 489 | | |
493 | 490 | | |
494 | | - | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
495 | 495 | | |
496 | 496 | | |
497 | 497 | | |
| |||
528 | 528 | | |
529 | 529 | | |
530 | 530 | | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
539 | | - | |
540 | | - | |
541 | | - | |
542 | | - | |
543 | | - | |
544 | | - | |
545 | 531 | | |
546 | 532 | | |
547 | 533 | | |
548 | 534 | | |
549 | 535 | | |
550 | 536 | | |
551 | | - | |
552 | 537 | | |
553 | 538 | | |
554 | 539 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
460 | 460 | | |
461 | 461 | | |
462 | 462 | | |
463 | | - | |
| 463 | + | |
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
959 | 959 | | |
960 | 960 | | |
961 | 961 | | |
962 | | - | |
| 962 | + | |
963 | 963 | | |
964 | 964 | | |
965 | 965 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1125 | 1125 | | |
1126 | 1126 | | |
1127 | 1127 | | |
1128 | | - | |
| 1128 | + | |
1129 | 1129 | | |
1130 | 1130 | | |
1131 | 1131 | | |
| |||
0 commit comments