Commit 0aa9f8e
Correct de_fuehrerschein docstring to match the actual pattern scope (#2138)
The class docstring gives "B0" (Berlin) as an example of a
Behördenkürzel and lists `B012345678A` in the Examples line, but the
regex `[A-Z]{2}\d{8}[A-Z0-9]` requires both leading characters to be
letters, so `B012345678A` never matches. The test file's docstring is
the authoritative one — it explicitly notes that single-letter Kfz
codes are used in 2-letter authority forms (e.g. `BO`, `KN`) and that
`B0`-style single-letter-plus-digit combinations are out of scope, and
`test_when_all_de_fuehrerschein_numbers_then_succeed` asserts
`B12345678A` is rejected.
Update the class docstring to match the tests: replace the `"B0"
Berlin` example with `"BO" Bochum`, add a short clarification about
single-letter Kfz codes, and change the misleading `B012345678A`
Examples entry to `BO12345678A`.
Co-authored-by: Sharon Hart <sharonh.dev@gmail.com>1 parent adc7c52 commit 0aa9f8e
1 file changed
Lines changed: 8 additions & 4 deletions
File tree
- presidio-analyzer/presidio_analyzer/predefined_recognizers/country_specific/germany
Lines changed: 8 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | | - | |
18 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
19 | 23 | | |
20 | 24 | | |
21 | 25 | | |
| |||
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
30 | | - | |
| 34 | + | |
31 | 35 | | |
32 | 36 | | |
33 | 37 | | |
| |||
0 commit comments