mirror of
https://github.com/Instagram/LibCST.git
synced 2025-12-23 10:35:53 +00:00
This ports `CSTNode.validate_types_shallow` and `CSTNode.validate_types_deep`, as well as `libcst._type_enforce` to the open-source release. These are useful if someone wants to use LibCST without a static type checker. These weren't originally included because `libcst._type_enforce` wasn't 3.7 compatible.
35 lines
997 B
Python
35 lines
997 B
Python
# Copyright (c) Facebook, Inc. and its affiliates.
|
|
#
|
|
# This source code is licensed under the MIT license found in the
|
|
# LICENSE file in the root directory of this source tree.
|
|
|
|
import sys
|
|
from os import path
|
|
|
|
# pyre-ignore Pyre doesn't know about setuptools.
|
|
import setuptools
|
|
|
|
|
|
this_directory = path.abspath(path.dirname(__file__))
|
|
with open(path.join(this_directory, 'README.md'), encoding='utf-8') as f:
|
|
long_description = f.read()
|
|
|
|
setuptools.setup(
|
|
name="libcst",
|
|
description="A concrete syntax tree with AST-like properties for Python 3.7.",
|
|
long_description=long_description,
|
|
long_description_content_type="text/markdown",
|
|
version="0.1.dev0",
|
|
packages=setuptools.find_packages(),
|
|
test_suite="libcst",
|
|
python_requires=">=3.6",
|
|
install_requires=[
|
|
"dataclasses; python_version < '3.7'",
|
|
"parso",
|
|
"typing_extensions",
|
|
"typing_inspect",
|
|
],
|
|
extras_require={
|
|
"dev": ["black", "isort", "pyre-check"],
|
|
}
|
|
)
|