Skip to content

Commit ba35f27

Browse files
committed
Minor readme/typing update
1 parent ebdd86f commit ba35f27

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ Some [Faker providers](https://faker.readthedocs.io/en/master/providers/baseprov
9595
fake -n 10 "pyint(1;100),credit_card_number(amex),pystr_format(?#-####)" -f json -c id,credit_card_number,license_plate
9696
```
9797

98+
> [!IMPORTANT]
99+
> When using arguments with output formats like JSON, it's best to provide column headers as well with `-c`.
100+
98101
And unique values are supported as well.
99102

100103
```bash

faker_cli/parser.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
from typing import List, Tuple
2-
3-
def infer_column_names(col_names, col_types: str) -> List[str]:
1+
def infer_column_names(col_names, col_types: str) -> list[str]:
42
"""
53
Infer column names from column types
64
"""
@@ -11,7 +9,7 @@ def infer_column_names(col_names, col_types: str) -> List[str]:
119
return col_types.split(",")
1210

1311

14-
def parse_column_types(input_string: str) -> List[Tuple[str, List]]:
12+
def parse_column_types(input_string: str) -> list[tuple[str, list]]:
1513
"""
1614
Parse a string of the format "pyint(1;10),datetime,profile(ssn,birthdate)" and split it by commas with optional parenthese-inclosed arguments.
1715
"""

0 commit comments

Comments
 (0)