forked from Rust-related/RustPython
clean up imports
This commit is contained in:
@@ -19,13 +19,18 @@ use proc_macro2::{Span, TokenStream};
|
||||
use quote::quote;
|
||||
use rustpython_bytecode::{CodeObject, FrozenModule};
|
||||
use rustpython_compiler as compile;
|
||||
use std::collections::HashMap;
|
||||
use std::env;
|
||||
use std::fs;
|
||||
use std::path::{Path, PathBuf};
|
||||
use syn::parse::{Parse, ParseStream, Result as ParseResult};
|
||||
use syn::spanned::Spanned;
|
||||
use syn::{self, parse2, Lit, LitByteStr, LitStr, Macro, Meta, MetaNameValue, Token};
|
||||
use std::{
|
||||
collections::HashMap,
|
||||
env, fs,
|
||||
path::{Path, PathBuf},
|
||||
};
|
||||
use syn::{
|
||||
self,
|
||||
parse::{Parse, ParseStream, Result as ParseResult},
|
||||
parse2,
|
||||
spanned::Spanned,
|
||||
Lit, LitByteStr, LitStr, Macro, Meta, MetaNameValue, Token,
|
||||
};
|
||||
|
||||
static CARGO_MANIFEST_DIR: Lazy<PathBuf> = Lazy::new(|| {
|
||||
PathBuf::from(env::var_os("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR is not present"))
|
||||
|
||||
@@ -6,10 +6,11 @@ use crate::util::{
|
||||
use proc_macro2::TokenStream;
|
||||
use quote::{quote, quote_spanned, ToTokens};
|
||||
use std::collections::HashMap;
|
||||
use syn::parse::{Parse, ParseStream, Result as ParsingResult};
|
||||
use syn::{
|
||||
parse_quote, spanned::Spanned, Attribute, AttributeArgs, Ident, Item, LitStr, Meta, NestedMeta,
|
||||
Result, Token,
|
||||
parse::{Parse, ParseStream, Result as ParsingResult},
|
||||
parse_quote,
|
||||
spanned::Spanned,
|
||||
Attribute, AttributeArgs, Ident, Item, LitStr, Meta, NestedMeta, Result, Token,
|
||||
};
|
||||
use syn_ext::ext::*;
|
||||
|
||||
|
||||
@@ -2,10 +2,14 @@ use indexmap::map::IndexMap;
|
||||
use proc_macro2::{Span, TokenStream};
|
||||
use quote::{quote, ToTokens};
|
||||
use std::collections::HashMap;
|
||||
use syn::Signature;
|
||||
use syn::{spanned::Spanned, Attribute, Ident, Meta, MetaList, NestedMeta, Path, Result, UseTree};
|
||||
use syn_ext::ext::{AttributeExt as SynAttributeExt, *};
|
||||
use syn_ext::types::PunctuatedNestedMeta;
|
||||
use syn::{
|
||||
spanned::Spanned, Attribute, Ident, Meta, MetaList, NestedMeta, Path, Result, Signature,
|
||||
UseTree,
|
||||
};
|
||||
use syn_ext::{
|
||||
ext::{AttributeExt as SynAttributeExt, *},
|
||||
types::PunctuatedNestedMeta,
|
||||
};
|
||||
|
||||
pub(crate) const ALL_ALLOWED_NAMES: &[&str] = &[
|
||||
"pymethod",
|
||||
|
||||
Reference in New Issue
Block a user