mirror of
https://github.com/Instagram/LibCST.git
synced 2025-12-23 10:35:53 +00:00
* Raise black's output file's target version to 3.7, which is the lowest supported Python version that libcst can be run on * Add to, instead of override, the exclusion rules of black * Fix the bug that files in `stubs/libcst_native/` are inadvertently ignored by black This is due to black's file exclusion mechanism is a file-system-unaware pure-string-based pattern match. We need to prepend "^/" to specify that we are referring to the root-level "native/" folder. Yeah, I know this looks strange, but blame black for it :) . See https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#configuration-format for further reference. * It's conventional to use single-quote literal string to represent regular expression in TOML format, because in this way it doesn't perform any escaping * When codemod, specify the black formatter to use the same target Python version we use * Fix the `test_codemod_formatter_error_input` unit test * Remove an unused import in `test_codemod_cli` module
12 lines
397 B
TOML
12 lines
397 B
TOML
[tool.black]
|
|
target-version = ["py37"]
|
|
extend-exclude = '^/native/' # Prepend "^/" to specify root file/folder. See https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#configuration-format
|
|
|
|
[tool.ufmt]
|
|
excludes = ["native/", "stubs/"]
|
|
|
|
[tool.slotscheck]
|
|
exclude-modules = '^libcst\.(testing|tests)'
|
|
|
|
[build-system]
|
|
requires = ["setuptools", "wheel", "setuptools-rust"]
|