Skip to content

Commit 4dae0a8

Browse files
committed
Added support for skip-numeric-underscore-normalization
1 parent 371f669 commit 4dae0a8

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

pyls_black/plugin.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ def format_text(*, text, config):
4747
py36=config["py36"],
4848
pyi=config["pyi"],
4949
skip_string_normalization=config["skip_string_normalization"],
50+
skip_numeric_underscore_normalization=config["skip_numeric_underscore_normalization"],
5051
)
5152
return black.format_file_contents(
5253
text, line_length=line_length, fast=fast, mode=mode
@@ -60,6 +61,7 @@ def load_config(filename: str) -> Dict:
6061
"py36": False,
6162
"pyi": False,
6263
"skip_string_normalization": False,
64+
"skip_numeric_underscore_normalization": False,
6365
}
6466

6567
root = black.find_project_root((filename,))

tests/fixtures/config/pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ line-length = 20
44
py36 = true
55
pyi = true
66
skip-string-normalization = true
7+
skip-numeric-underscore-normalization = true

tests/test_plugin.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ def test_load_config():
133133
"pyi": True,
134134
"fast": True,
135135
"skip_string_normalization": True,
136+
"skip_numeric_underscore_normalization": True,
136137
}
137138

138139

@@ -145,4 +146,5 @@ def test_load_config_defaults():
145146
"pyi": False,
146147
"fast": False,
147148
"skip_string_normalization": False,
149+
"skip_numeric_underscore_normalization": False,
148150
}

0 commit comments

Comments
 (0)