Disallow unreachable_pub (#4314)

This commit is contained in:
Jonathan Plasse 2023-05-12 00:00:00 +02:00 committed by GitHub
parent 97802e7466
commit c10a4535b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
444 changed files with 1376 additions and 1106 deletions

View file

@ -7,13 +7,13 @@ use std::path::PathBuf;
use anyhow::{bail, Result};
#[derive(clap::Args)]
pub struct Args {
pub(crate) struct Args {
/// Python file for which to generate the CST.
#[arg(required = true)]
file: PathBuf,
}
pub fn main(args: &Args) -> Result<()> {
pub(crate) fn main(args: &Args) -> Result<()> {
let contents = fs::read_to_string(&args.file)?;
match libcst_native::parse_module(&contents, None) {
Ok(python_cst) => {